Question: parse error with samtools
0
gravatar for a.rex
2.1 years ago by
a.rex180
a.rex180 wrote:

I am using the following parallel command to run hisat on individual files, and pipe the output to make a new bam file:

sudo parallel echo “./hisat2 --dta -p 32 -x /pathtoindex/index -U {}  \| ./samtools view -b - \> /path/to/output/{/.}.bam” :::: fs > bam.sh

fs contains a list of my file paths, and bam.sh is my executable.

However, when I run this I get the following error:

[W::sam_read1] parse error at line 1
[main_samview] truncated file.

Is there something wrong with my parallel command that samtools does not seem to like?

linux samtools parallel • 1.3k views
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by a.rex180
3

I don't think there is a good reason to use sudo in this command. If you don't absolutely have to, don't.

ADD REPLYlink written 2.1 years ago by WouterDeCoster37k
1

Sometimes I'm glad Apple implemented SIP. Rogue sudos can wreak havoc.

ADD REPLYlink written 2.1 years ago by RamRS20k

Thanks - sudo is not needed, silly mistake

ADD REPLYlink written 2.1 years ago by a.rex180
1

I can't decipher what's wrong with your parallel command... Tagging ole.tange

You can use parallel --dryrun to see how the command is going to be ran, i.e. print the command string. And then check if that's as expected.

ADD REPLYlink written 2.1 years ago by WouterDeCoster37k
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: 1235 users visited in the last hour