Closed psecekartal closed 1 year ago
Hi Ece,
It seems to me that it was not installed properly. I would try to re-install. Is the error when using snakemake? Did you try to run the tool outside of snakemake?
Hi Alessio, I installed it via snakemake and it should be normally ok. I removed the env and then forced snakemake to reinstall but the error remained. I will install outside snakemake and let you know. So far when I copy motus.remove.padded.sh to conda env for snakemake, everything works.
When I install locally, I also get same error
Error: metaSNVRMPadded finished with an error Error: b'bash: /Users/ecekartal/opt/miniconda3/envs/motus/lib/python3.8/site-packages/motus/motus.remove.padded.sh: No such file or directory\n' Error: b''
The file is needed for metaSNV. And I guess you are also trying to run the metaSNV commands (map_snv
or snv_call
)?
Can you send us the code that you use to install and run? So that we can try to reproduce the error.
I use a yaml file for motus v3.0.3, both on the server and my local machine, this file is missing. Funny enough for v3.0.1 it is there. So far I copied the file manually and it works in that case.
How I installed motus locally: conda install -c bioconda motus
Here is the .yaml file and how I run:
name: motus
channels:
- conda-forge
- bioconda
- defaults
- nodefaults
dependencies:
- motus=3.0.3
and for running:
rule motus_map_snv:
input:
fastq1 = rules.samtools_fastq_separate.output.hostremoved1,
fastq2 = rules.samtools_fastq_separate.output.hostremoved2,
output:
bam = dir_output + "/motus_v3.0.3/snv/bam/{sample}.bam",
log:
dir_output + "/logs/motus_v3.0.3/{sample}.motus_v3_map_snv.log"
message:
"Running motus map snv for sample {wildcards.sample}"
params:
DBLoc = dir_input + "/db_mOTU"
threads:
nThreads
conda:
"envs/motus.yaml"
shell:
"""
# Generating single nucleotide variant (SNV) profiles using MGs
# map_snv takes one or multiple sequencing files and aligns reads against the mOTU profiler database:
motus map_snv \
-f {input.fastq1} \
-r {input.fastq2} \
-l 75 \
-t {threads} \
-o {output.bam} \
-db {params.DBLoc} &> {log}
"""
rule motus_snv_call:
input:
allbam = expand('{dir}/motus_v3.0.3/snv/bam/{sample}.bam',
dir = dir_output, sample = allSamplesUnique)
output:
motus_snv = directory(dir_output + "/motus_v3.0.3/snv/motus_snv")
log:
dir_output + "/logs/motus_v3.0.3/motus_v3_snv_call.log"
message:
"Running motus merge snv for samples"
params:
# -d Call metaSNV on all bam files in the directory. [Mandatory]
bam = dir_output + "/motus_v3.0.3/snv/bam",
DBLoc = dir_input + "/db_mOTU"
threads:
nThreads
conda:
"envs/motus.yaml"
shell:
"""
# snv_call calls variants using the metaSNV package
motus snv_call \
-d {params.bam} \
-db {params.DBLoc} \
-o {output.motus_snv}
"""
I can share the env files via email Thank you Alessio!
Hello @psecekartal. Is this issue resolved?
Hello, when I install motus v3.0.3 via conda, motus.remove.padded.sh doesnt exist and I get the following error. I check the git and the file is there, maybe an issue for conda enviroments?
'.../workflow/.snakemake/conda/7382cb7a2e5c3dcc34de3695c892086f_/lib/python3.9/site-packages/motus/motus.remove.padded.sh No such file or directory\n'
Do you have any suggestion how to fix this issue? I dont want to add this file manually.