biostars / biostar-handbook

Issue tracker for the Biostar Handbook
57 stars 12 forks source link

samtools sort: truncated file. Aborting #134

Open tiptophamza opened 3 years ago

tiptophamza commented 3 years ago

While aligning to the reference genome using the following code, parse error error was encountered. I have tried running the command severally and also redoing the entire process but i still get stuck here. Kindly assist. command: cat runids.txt | parallel --eta --verbose bwa mem -t 4 $REF data/{}_1.fastq | samtools sort

error: main] Version: 0.7.17-r1188 [main] CMD: bwa mem -t 4 refs/saccer3.fa data/SRR3033156_1.fastq [main] Real time: 652.071 sec; CPU: 554.514 sec ETA: 0s Left: 3 AVG: 0.00s local:1/1/100%/750.0s [W::sam_read1] Parse error at line 8743844 samtools sort: truncated file. Aborting (bioinfo)

see image below: image

ialbert commented 3 years ago

This tracker deals with issues relating the content of the book. It is not a place to ask about other problems you may encounter. In general no answers can be provided for other problems.

In this case though the problem quite evident so I make an exception, you are not using parallel correctly, you are piping the incorrect output. Place the command into quotes. For example:

cat ids | parallel echo {} > {}

will produce completely different outcomes than:

cat ids | parallel "echo {} > {}"

refer to the "Art of Bioinformatics Scripting" for more details.

tiptophamza commented 3 years ago

Thank you for your prompt response and for the referral. However, please note that this issue was a result of re-analyzing ChIP-seq example in chapter 108...page 686 of the seconds edition.

ialbert commented 3 years ago

oh, ok sorry about that, please do mention that, that line needs fixing then.