sample2markers.py failed at samtools sort

169 views
Skip to first unread message

Jamie Kwok

unread,
Mar 8, 2017, 10:50:42 AM3/8/17
to MetaPhlAn-users
Hello,

When I run this command:
sample2markers.py --verbose --ifn_samples strainphlan2_output/15V0257194_after_human_F2.sam.bz2 --input_type sam --output_dir ./test2

It returns this error:
[bam_sort_core] fail to open './test2/15V0257194_after_human_F2.sam.bz2.bam.sorted': No such file or directory
(...trimmed for clarity)
ooSubprocessException: Failed when executing the command: dump_file.py --input_file strainphlan2_output/15V0257194_after_human_F2.sam.bz2 | samtools view -bS - | samtools sort -o - ./test2/15V0257194_after_human_F2.sam.bz2.bam.sorted
return code: 1

I guess it failed at samtools sort. I don't understand why it's '-o -' since -o is specifying the output file which should be /test2/15V0257194_after_human_F2.sam.bz2.bam.sorted. Why is the stdin '-' in between? I am confused because other people have seemed to run it smoothly. Please help. Thank you very much.

Best regards,
Jamie

Duy Tin Truong

unread,
Mar 10, 2017, 5:02:37 AM3/10/17
to Jamie Kwok, MetaPhlAn-users
Hi Jamie,

Can you try to run the above command alone to see what is the problem?

dump_file.py --input_file strainphlan2_output/15V0257194_after_human_F2.sam.bz2 | samtools view -bS - | samtools sort -o - ./test2/15V0257194_after_human_F2.sam.bz2.bam.sorted

In addition, can you check if all dependencies were installed with the correct version as in the tutorial, especially samtools 0.1.19?

Cheers,
Tin




--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jamie Kwok

unread,
Mar 10, 2017, 11:10:00 AM3/10/17
to Duy Tin Truong, MetaPhlAn-users
Hi Tin,

Thank you very much for your reply. I originally have samtools 1.3.1, and after changing to 0.1.19, and fixing a typo (test/ instead of test2), it seems to go farther:
$ dump_file.py --input_file strainphlan2_output/15V0257194_after_human_F2.sam.bz2 | samtools view -bS - | samtools sort -o - ./test/15V0257194_after_human_F2.sam.bz2.bam.sorted | samtools mpileup -u - | bcftools view -c -g -p 1.1 - | fix_AF1.py --input_file - | vcfutils.pl vcf2fq
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] EOF marker is absent. The input is probably truncated.
Error: Could not parse --min-ac -g
@
Use of uninitialized value $l in numeric lt (<) at /home/jamie/bcftools-1.3.1/vcfutils.pl line 566.
+
Use of uninitialized value $l in numeric lt (<) at /home/jamie/bcftools-1.3.1/vcfutils.pl line 566.
[samopen] SAM header is present: 1036027 sequences.
[mpileup] 1 samples in 1 input files

However there is no final output?
I checked that the 15V0257194_after_human_F2.sam.bz2 is non-empty.


Best regards,
Jamie

To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-users+unsubscribe@googlegroups.com.

Duy Tin Truong

unread,
Mar 11, 2017, 4:53:08 PM3/11/17
to Jamie Kwok, MetaPhlAn-users
You should use bcftools 0.1.19 as well.

Cheers,
Tin

To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.

Jamie Kwok

unread,
Mar 12, 2017, 11:55:17 PM3/12/17
to Duy Tin Truong, MetaPhlAn-users
Thank you so much Tin! (and silly me!) It works now.

Best regards,
Jamie

To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages