Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
AVA-difference betweeen "computation" reads and "global align" reads CCBIO 454 Pyrosequencing 0 01-17-2014 03:13 AM
How does cuffdiff call a difference "significant"? marcora Bioinformatics 13 07-21-2013 03:17 PM
picard-tools "Unrecognized tag type" error jtackney Bioinformatics 2 05-19-2013 03:55 PM
The position file formats ".clocs" and "_pos.txt"? Ist there any difference? elgor Illumina/Solexa 0 06-27-2011 07:55 AM
What is the difference between "maq match" and "maq map" cliff Bioinformatics 1 11-16-2009 02:13 PM

Thread Tools
Old 01-21-2014, 03:11 AM   #1
Location: Barcelona

Join Date: Feb 2012
Posts: 49
Default Difference between "bedtools bamtofastq" and Picard's SamToFastq

I need to assembly some unmapped reads from Tophat2's output "unmapped.bam"
Firstly I have to extract read pairs from unmapped.bam

I found two tools for it:
bedtools bamtofastq -i unmapped.bam -fq bedtools_un1.fastq -fq2 bedtools_un2.fastq
java -jar SamToFastq.jar I=unmapped.bam F=picard_un1.fastq F2=picard_un2.fastq VALIDATION_STRINGENCY=SILENT
bedtools_un1.fastq has 685 MB
picard_un1.fastq has 915 MB

My question is, why the difference in the size of files is so big?
Shouldn't the result files be the same? (as the inmput "unmapped.bam" is the same)
thedamian is offline   Reply With Quote
Old 01-21-2014, 04:45 AM   #2
Senior Member
Location: Budapest

Join Date: Mar 2010
Posts: 329

Please take a look inside the files. It should be the same size, but maybe one of the programs write out different header or give full header in the quality section.
TiborNagy is offline   Reply With Quote
Old 01-21-2014, 04:57 AM   #3
Location: Barcelona

Join Date: Feb 2012
Posts: 49

wc -l picard_un1.fastq
15367376 picard_un1.fastq

wc -l bedtools_un1.fastq
11515208 bedtools_un1.fastq

headers are the same
thedamian is offline   Reply With Quote
Old 01-21-2014, 05:00 AM   #4
Devon Ryan
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480

Tophat will often map only one mate from a pair. In those cases, it's up to the program to determine whether such reads should or should not be written to a file. It's quite likely that SamToFastq outputs orphaned reads whereas bamtofastq doesn't.
dpryan is offline   Reply With Quote

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:01 PM.

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