9
$\begingroup$

I have NGS illumina RNA-seq reads from M. musculus (mm10). I am trying to find variants along the strand portion of the reads in the refseq (mm10).

I mapped a pair of sequence files and generated a BAM file. Now I need to generate a VCF file from this BAM file. I’ve checked Galaxy for direct tools, but I couldn’t identify one. Any suggestions on how to turn a BAM file into VCF? Thank you in advance.

$\endgroup$
3
  • 1
    $\begingroup$ Possible duplicate of How do I generate a variant list (i.e. VCF file) using Illumina reads from a human genome? $\endgroup$
    – gringer
    Apr 7, 2018 at 23:48
  • 1
    $\begingroup$ @gringer: The question asks about RNA-seq reads, where as your flagged potential duplicate is asking about DNA reads as best I can see. The process is not quite the same. $\endgroup$ Oct 11, 2018 at 10:39
  • 1
    $\begingroup$ The approach works with RNASeq reads as well. All it needs is sufficient coverage across mapped reads. Where coverage is too high, reads can be sub-sampled via digital normalisation to reduce high-coverage regions without compromising coverage for low-coverage regions. $\endgroup$
    – gringer
    Oct 11, 2018 at 22:02

2 Answers 2

19
$\begingroup$

It's not really possible to convert bam to vcf. bam is a mapping file, it does not contain the information about variants, this information needs to be inferred in process called variant calling. I find important to mention that it's not just a different format of the same thing.

How to call variants (a vcf file) from mapped reads (a bam file) is very broad question, it depends on the sequencing technology (Illumina, PacBio, ...), the type of sequencing (whole genome sequencing, RAD, RNA-seq, ...), the sampling (calling of individuals vs population variability), the quality of a reference (human vs denovo assembly made by a postdoc in your lab)... For a lot of cases the answer is simply GATK, partially because it has well written manual, but mainly just because many people use it.

Some more detailed cases are well answered in more specific questions :

$\endgroup$
2
  • 1
    $\begingroup$ Indeed, relevant to this question, GATK have a Variants from RNA-seq best practices. Or they used to, and now it seems to have disappeared. $\endgroup$ Oct 11, 2018 at 10:37
  • 1
    $\begingroup$ Honestly, I think good practices do not involve GATK. But it's true that GATK is what makes a review process much smoother (reviewers want GATK). $\endgroup$ Oct 11, 2018 at 10:56
5
$\begingroup$

You can use Freebayes, provided you have your BAM file and the reference genome.

Example:

freebayes -f genome.fa aln.bam > var.vcf

I'd suggest you go through the whole github documentation, and choose the option(s) more suitable for your needs (ploidy, read support, etc.)

$\endgroup$
2
  • 1
    $\begingroup$ Thanks. Unfortunately when I tried this approach I didn’t get any variant readings along the mapped portion of the refseq. Not sure why. I know there are a few variants. $\endgroup$
    – Lou_A
    Apr 13, 2018 at 19:58
  • 1
    $\begingroup$ This answer would be more useful if it included a cautionary comment about how what the OP is asking about is not a format conversion, but an analytical process, ie variant calling, like Kamil S Jaron provided. In addition, the recommendation to "go through the whole github documentation" is unlikely to be satisfying given the OP is probably new to the field. Kamil's pointers to specific resources are much more helpful. $\endgroup$ Apr 23, 2020 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.