Question: Unaligning BAM files
0
gravatar for M. Khan
4.1 years ago by
M. Khan0
United States
M. Khan0 wrote:

Can anyone help me unalign BAM files that have been aligned using TMAP? I want to run my raw reads through GATK best practices but the BAM files we received from our core facility are already aligned using TMAP. Thanks!

tmap bam iontorrent • 1.3k views
ADD COMMENTlink modified 4.1 years ago by Saulius Lukauskas530 • written 4.1 years ago by M. Khan0
1

GATK accepts sorted bam files. So, why you want to unalign to raw reads?

ADD REPLYlink written 4.1 years ago by Renesh1.6k

I want to be able to use the same methodology in a previous study on a different type of cancer. 

ADD REPLYlink written 4.1 years ago by M. Khan0

can you please elaborate in brief? 

ADD REPLYlink written 4.1 years ago by Renesh1.6k

Basically I want to

1. mark and remove PCR duplicates with the Picard package. 

2. Realign Indels with known sites and base quality score recalibration were performed with GATK (Genome Analysis Toolkit), in line with current best practices in the next-generation sequencing field for variant detection, to produce variant-caller ready reads in BAM format. 

3. Call variants with MuTect

4. Use Invex to find passenger vs driver mutations

ADD REPLYlink written 4.1 years ago by M. Khan0

For these analysis, you dont need raw read files. you can use bam files that you have got. Sort them, if it is not. used this sorted files for MarkDuplicates and further analysis. 

So you dont need to obtain reads from your bam files. If you still want to obtain raw reads use bedtools bamtofastq 

conversion tool. 

You may not get unaligned reads in fastq files that you obtain from bam files.

ADD REPLYlink modified 4.1 years ago • written 4.1 years ago by Renesh1.6k

You want to run your reads through "GATK best practices" to do what ?

In the meantime, I have the following program: https://github.com/grenaud/libbam/blob/master/removeTagsMapping.cpp

 

ADD REPLYlink written 4.1 years ago by Gabriel R.2.6k

I am trying to find mutations that are present in diseased tissue versus  the patients blood.

ADD REPLYlink written 4.1 years ago by M. Khan0

so you want to run quality score recall and indel realignment and stuff ? You need mapped reads for this.

ADD REPLYlink written 4.1 years ago by Gabriel R.2.6k

I do, but I'm trying to use the Galaxy Project and that won't work with TMAP aligned reads

ADD REPLYlink written 4.1 years ago by M. Khan0

The best thing to do is to ask the sequencing core to provide you with the original fastq files. Also, beware of the the homopolymer repeat error in the Ion torrent data. 

ADD REPLYlink written 4.1 years ago by Ashutosh Pandey11k
0
gravatar for donfreed
4.1 years ago by
donfreed1.4k
Mountain View, CA
donfreed1.4k wrote:
samtools sort -n my_alignment.bam my_alignment_qsorted

bedtools bamtofastq -i my_alignment_qsorted.bam -fq /dev/stdout -fq2 /dev/stdout | bwa mem -p /mnt/data/reference/hs37d5.fa - | samtools view -Sb > realigned.bam

If you want to run the GATK, I recommend:

bedtools bamtofastq -i my_alignment_qsorted.bam -fq /dev/stdout -fq2 /dev/stdout | bwa mem -p -R "@RG\tID:foo\tSM:my_sample" /mnt/data/reference/hs37d5.fa - | samblaster | samtools view -Sb - > realigned.bam
ADD COMMENTlink written 4.1 years ago by donfreed1.4k
0
gravatar for Saulius Lukauskas
4.1 years ago by
London, UK
Saulius Lukauskas530 wrote:

Is bamtofastq from bedtools what you need: http://bedtools.readthedocs.org/en/latest/content/tools/bamtofastq.html ?

ADD COMMENTlink written 4.1 years ago by Saulius Lukauskas530
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 922 users visited in the last hour