Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subprocess.CalledProcessError #35

Open
Wanli-HE opened this issue May 3, 2023 · 1 comment
Open

subprocess.CalledProcessError #35

Wanli-HE opened this issue May 3, 2023 · 1 comment

Comments

@Wanli-HE
Copy link

Wanli-HE commented May 3, 2023

Hi !

do you meeting this kind of error before?

this is the main program error:
Traceback (most recent call last):
File "/home/projects/ku_00041/apps/wanli/v1.4.1-plaspline/Plaspline/conda_envs/be5eeecf/bin/scapp", line 10, in
sys.exit(main())
File "/home/projects/ku_00041/apps/wanli/v1.4.1-plaspline/Plaspline/conda_envs/be5eeecf/lib/python3.7/site-packages/scapp/scapp.py", line 234, in main
subprocess.check_call(cmd,stderr=subprocess.STDOUT, stdout=bwa_outfile, shell=True)
File "/home/projects/ku_00041/apps/wanli/v1.4.1-plaspline/Plaspline/conda_envs/be5eeecf/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bwa mem -t 40 circular/SRR9879791_k121__scapp_out/intermediate_files/assembly_graph.nodes.fasta qc_res/SRR9879791_1_kneaddata_paired_1.fastq.gz qc_res/SRR9879791_1_kneaddata_paired_2.fastq.gz | samtools view -buS -@ 39 - > circular/SRR9879791_k121__scapp_out/intermediate_files/reads_pe.bam' returned non-zero exit status 1.

here is the detail of the error in bwa file
bwa_log:
[mem_sam_pe] paired reads have different names: "ERR7384863.5#0", "ERR7384863.29#0"

[mem_sam_pe] paired reads have different names: "ERR7384863.4#0", "ERR7384863.28#0"

[mem_sam_pe] paired reads have different names: "ERR7384863.3#0", "ERR7384863.27#0"

[mem_sam_pe] paired reads have different names: "ERR7384863.6#0", "ERR7384863.31#0"

[mem_sam_pe] [main_samview] truncated file.
samtools view: error closing "-": -5

@dpellow
Copy link
Collaborator

dpellow commented May 4, 2023

This looks like an error due to samtools. What happens when you run the command itself:
bwa mem -t 40 circular/SRR9879791_k121__scapp_out/intermediate_files/assembly_graph.nodes.fasta qc_res/SRR9879791_1_kneaddata_paired_1.fastq.gz qc_res/SRR9879791_1_kneaddata_paired_2.fastq.gz | samtools view -buS -@ 39 - > circular/SRR9879791_k121__scapp_out/intermediate_files/reads_pe.bam ?

From the messages in the log file it looks like read files are not formatted as expected by samtools, can you tell if this is the case? The read names might not be in the expected format or the files might not be properly paired. Maybe this could be fixed by changing the read names or fixing the files, for example with bbmap repair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants