Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
BBmap can not produce sorted bam zhanghao Bioinformatics 10 12-09-2016 02:57 PM
Convert merged BAM back to per lane BAM or FASTQ file danielsbrewer Bioinformatics 6 10-03-2013 07:29 AM
samtools calmd produce truncated bam file liuxq Bioinformatics 0 02-21-2012 11:28 PM
Reverse engineering BAM files: BAM -> FASTQ gene coder Bioinformatics 3 01-03-2012 02:42 PM
*.bam -> var.bcf No result dongshenglulv Bioinformatics 8 09-02-2011 06:03 AM

Thread Tools
Old 12-11-2018, 05:18 AM   #1
Alex Lee
Junior Member
Location: N. Cal

Join Date: Apr 2014
Posts: 10
Post BAM -> FASTQ why can I not produce the same result?

Dear all, I've been trying to test if I can produce the same fusion call starting from BAM instead of FASQ. My STAR command is as such.

HTML Code:
STAR --genomeDir /index/hg38.p5/ \
--readFilesIn T1_1.fq.gz T1_2.fq.gz \
--readFilesCommand zcat --outFileNamePrefix T1 --outSAMtype BAM SortedByCoordinate --quantMode GeneCounts --sjdbGTFfile /index/hg38.gtf
This is how the resulting BAM file looks like.

HTML Code:
samtools flagstat T1Aligned.sortedByCoord.out.bam

121206267 + 0 in total (QC-passed reads + QC-failed reads)
11756519 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
121206267 + 0 mapped (100.00% : N/A)
109449748 + 0 paired in sequencing
54766664 + 0 read1
54683084 + 0 read2
109354332 + 0 properly paired (99.91% : N/A)
109354332 + 0 with itself and mate mapped
95416 + 0 singletons (0.09% : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
However, I have tried a number of tools including the following.
HTML Code:
1. samtools sort -n --threads 4 ./T1Aligned.sortedByCoord.out.bam|samtools fastq -1 T1_R1_.fq -2 T1_R2_.fq -0 test.fq -
I tried converting back to uBAM and doing it again.

HTML Code:
/picard-tools-2.2.4/picard.jar RevertSam I=T1Aligned.sortedByCoord.out.bam O=T1.ubam QUIET=true VALIDATION_STRINGENCY=SILENT

/picard-tools-2.2.4/picard.jar SamToFastq INPUT=T1.ubam FASTQ=T1_R1_.fq SECOND_END_FASTQ=T2_R2_.fq VALIDATION_STRINGENCY=SILENT
I also tried out this tutorial here, but failed because of some read mismatch.

I also tried bedtools bamtofastq but nothing works. When I input fastq vs what I can derive from BAM-> Fastq I'm not getting the same fusion output as I did previously. Anybody with suggestions? Thanks!
Alex Lee is offline   Reply With Quote
Old 12-11-2018, 09:39 AM   #2
Location: Muenster

Join Date: Apr 2016
Posts: 13

Cross-posted on Biostars
atpoint is offline   Reply With Quote

bam conversion, fastq fasta reads, picard, samtools, star aligner

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 11:52 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO