parse error with samtools
0
0
Entering edit mode
7.8 years ago
a.rex ▴ 350

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?

samtools linux parallel • 3.5k views
ADD COMMENT
3
Entering edit mode

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 REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thanks - sudo is not needed, silly mistake

ADD REPLY
1
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2025 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6