Closed nick-youngblut closed 6 years ago
Which version of bowtie2 are you using? MetaCompass requires bowtie2.2.9. If that's not the problem can you share "example1_output/thao2000.0.bowtie2map.log"?
Whoops, yeah I was accidentally using an old version of bowtie2
not in the conda environment. The Bowtie2--->[OK]
line lulled me into thinking that the bowtie2 dependency was OK. Installing bowtie2 fixed the first example error, but not the 2nd:
$ ./go_metacompass.py -P SRS044742/SRS044742.denovo_duplicates_marked.trimmed.1.fastq,SRS044742/SRS044742.denovo_duplicates_marked.trimmed.2.fastq -U SRS044742/SRS044742.denovo_duplicates_marked.trimmed.singleton.fastq -o example2_output
checking for dependencies (Bowtie2, Blast, kmermask, Snakemake, etc)
Bowtie2--->[OK]
/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/bin/blastn
Blast+--->[OK]
/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/bin/kmer-mask
kmer-mask--->[OK]
/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/bin/snakemake
Snakemake--->[OK]
Full Traceback (most recent call last):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 646, in block_content
rulename=self.rulename).consume():
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 105, in consume
for t, orig in self.state(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 170, in block
raise StopAutomaton(token)
snakemake.parser.StopAutomaton: TokenInfo(type=1 (NAME), string='output', start=(78, 4), end=(78, 10), line=" output:expand('{prefix}/{sample}.fasta',prefix=config['prefix'],sample=config['sample'])\n")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 646, in block_content
rulename=self.rulename).consume():
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 105, in consume
for t, orig in self.state(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 170, in block
raise StopAutomaton(token)
snakemake.parser.StopAutomaton: TokenInfo(type=1 (NAME), string='message', start=(79, 4), end=(79, 11), line=' message: """---Converting fastq to fasta."""\n')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 646, in block_content
rulename=self.rulename).consume():
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 105, in consume
for t, orig in self.state(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 170, in block
raise StopAutomaton(token)
snakemake.parser.StopAutomaton: TokenInfo(type=1 (NAME), string='shell', start=(80, 4), end=(80, 9), line=' shell : "perl %s/bin/fq2fa.pl -i {input} -o {output}"%(config["mcdir"])\n')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 646, in block_content
rulename=self.rulename).consume():
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 105, in consume
for t, orig in self.state(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 170, in block
raise StopAutomaton(token)
snakemake.parser.StopAutomaton: TokenInfo(type=1 (NAME), string='log', start=(81, 4), end=(81, 7), line=" log:'%s/%s.%s.fastq2fasta.log'%(config['prefix'],config['sample'],config['iter'])\n")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/__init__.py", line 382, in snakemake
print_compilation=print_compilation)
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/workflow.py", line 652, in include
rulecount=self._rulecount)
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 766, in parse
for t, orig_token in automaton.consume():
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 105, in consume
for t, orig in self.state(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 710, in python
for t in self.subautomaton(token.string).consume():
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 105, in consume
for t, orig in self.state(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 179, in block
for t in self.block_content(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 653, in block_content
for t in self.block(e.token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 179, in block
for t in self.block_content(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 653, in block_content
for t in self.block(e.token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 179, in block
for t in self.block_content(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 653, in block_content
for t in self.block(e.token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 179, in block
for t in self.block_content(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 653, in block_content
for t in self.block(e.token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 179, in block
for t in self.block_content(token):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 644, in block_content
"rule {}.".format(self.rulename), token)
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass/lib/python3.5/site-packages/snakemake/parser.py", line 117, in error
(self.snakefile.path, lineno(token), None, None))
File "/ebio/abt3_projects/software/dev/tmp/MetaCompass/snakemake/metacompass.iter0.py", line 81
SyntaxError: No rule keywords allowed after run/shell/script/wrapper/cwl in rule fastq2fasta.
SyntaxError in line 81 of /ebio/abt3_projects/software/dev/tmp/MetaCompass/snakemake/metacompass.iter0.py:
No rule keywords allowed after run/shell/script/wrapper/cwl in rule fastq2fasta. (metacompass.iter0.py, line 81)
ERROR: snakemake command failed; exiting..
touch: cannot touch 'example2_output/SRS044742.0.assembly.out/run.fail': No such file or directory
It appears that there's a legit syntax error in the fastq2fasta
rule. I can't tell what the problem is though. I've used snakemake
before, but I can't see what the problem is.
My updated conda environment:
# packages in environment at /ebio/abt3_projects/software/dev/miniconda3_dev/envs/metacompass:
#
# Name Version Build Channel
aioeasywebdav 2.2.0 py35_0 conda-forge
aiohttp 3.2.1 py35_0 conda-forge
appdirs 1.4.3 py_0 conda-forge
asn1crypto 0.24.0 py35_0 conda-forge
async-timeout 2.0.1 py35_0 conda-forge
attrs 18.1.0 py_0 conda-forge
bcrypt 3.1.4 py35ha35c455_0
blast 2.7.1 boost1.64_3 bioconda
boost 1.64.0 py35_4 conda-forge
boost-cpp 1.64.0 1 conda-forge
boto3 1.7.19 py_0 conda-forge
botocore 1.10.19 py_0 conda-forge
bowtie2 2.3.4.1 py35pl5.22.0_0 bioconda
bzip2 1.0.6 1 conda-forge
ca-certificates 2018.4.16 0 conda-forge
cachetools 2.0.1 py_0 conda-forge
certifi 2018.4.16 py35_0 conda-forge
cffi 1.11.5 py35_0 conda-forge
chardet 3.0.4 py35_0 conda-forge
configargparse 0.12.0 py35_0 conda-forge
cryptography 2.2.1 py35_0 conda-forge
curl 7.59.0 1 conda-forge
datrie 0.7.1 py35_0
docutils 0.14 py35_0 conda-forge
dropbox 7.3.1 py35_0 conda-forge
filechunkio 1.6 py35_0 bioconda
ftputil 3.2 py35_0 bioconda
gmp 6.1.2 0 conda-forge
gnutls 3.5.17 0 conda-forge
google-auth 1.2.1 py_0 conda-forge
google-auth-httplib2 0.0.2 py35_0 conda-forge
google-cloud-core 0.24.1 py35_0 conda-forge
google-cloud-storage 1.1.1 py35_0 conda-forge
google-resumable-media 0.0.2 py35_0 conda-forge
googleapis-common-protos 1.5.3 py35_0 conda-forge
httplib2 0.11.1 py35_0 conda-forge
icu 58.2 0 conda-forge
idna 2.6 py35_1 conda-forge
idna_ssl 1.0.0 0 conda-forge
intel-openmp 2018.0.0 8
jmespath 0.9.3 py35_0 conda-forge
krb5 1.14.6 0 conda-forge
libdeflate 0.8 0 bioconda
libffi 3.2.1 3 conda-forge
libgcc 7.2.0 h69d50b8_2
libgcc-ng 7.2.0 hdf63c60_3
libgfortran-ng 7.2.0 hdf63c60_3
libidn11 1.33 0 conda-forge
libprotobuf 3.5.2 0 conda-forge
libssh2 1.8.0 2 conda-forge
libstdcxx-ng 7.2.0 hdf63c60_3
megahit 1.1.2 py35_1 bioconda
meryl 2013 0 bioconda
mkl 2018.0.2 1
mkl_fft 1.0.2 py35_0 conda-forge
mkl_random 1.0.1 py35_0 conda-forge
multidict 4.3.1 py35_0 conda-forge
ncurses 5.9 10 conda-forge
nettle 3.3 0 conda-forge
numpy 1.14.3 py35h14a74c5_0
numpy-base 1.14.3 py35hdbf6ddf_0
openjdk 8.0.121 1
openssl 1.0.2o 0 conda-forge
pandas 0.22.0 py35_1 conda-forge
paramiko 2.4.1 py35_0 conda-forge
pcre 8.41 1 conda-forge
perl 5.22.0.1 0 conda-forge
perl-app-cpanminus 1.7043 pl5.22.0_0 bioconda
perl-archive-tar 2.18 pl5.22.0_2 bioconda
perl-carp 1.38 pl5.22.0_0 bioconda
perl-compress-raw-bzip2 2.069 1 bioconda
perl-compress-raw-zlib 2.069 3 bioconda
perl-data-dumper 2.161 pl5.22.0_0 bioconda
perl-exporter 5.72 pl5.22.0_0 bioconda
perl-exporter-tiny 0.042 1 bioconda
perl-extutils-makemaker 7.24 pl5.22.0_1 bioconda
perl-io-compress 2.069 pl5.22.0_2 bioconda
perl-io-zlib 1.10 1 bioconda
perl-list-moreutils 0.428 pl5.22.0_0 bioconda
perl-pathtools 3.73 0 bioconda
perl-scalar-list-utils 1.45 2 bioconda
perl-test-more 1.001002 pl5.22.0_0 bioconda
perl-threaded 5.22.0 pl5.22.0_12 bioconda
pilon 1.22 py35_0 bioconda
pip 9.0.3 py35_0 conda-forge
prettytable 0.7.2 py35_1 conda-forge
protobuf 3.5.2 py35_0 conda-forge
psutil 5.4.5 py35_0 conda-forge
pyasn1 0.4.2 py_0 conda-forge
pyasn1-modules 0.0.5 py35_0 bioconda
pycparser 2.18 py35_0 conda-forge
pynacl 1.1.2 py35_0 conda-forge
pysftp 0.2.9 py35_0 bioconda
python 3.5.5 1 conda-forge
python-dateutil 2.3 py35_0 bioconda
python-irodsclient 0.7.0 py_0 conda-forge
pytz 2018.4 py_0 conda-forge
pyyaml 3.12 py35_1 conda-forge
ratelimiter 1.2.0 py35_0 conda-forge
readline 7.0 0 conda-forge
requests 2.13.0 py35_0 conda-forge
rsa 3.1.4 py35_0 bioconda
s3transfer 0.1.13 py35_0 conda-forge
samtools 1.8 3 bioconda
setuptools 39.1.0 py35_0 conda-forge
six 1.11.0 py35_1 conda-forge
snakemake 4.8.1 py35_0 bioconda
sqlite 3.20.1 2 conda-forge
tbb 2018_20171205 0 conda-forge
tk 8.6.7 0 conda-forge
urllib3 1.12 py35_0 bioconda
wheel 0.31.0 py35_0 conda-forge
wrapt 1.10.11 py35_0 conda-forge
xmlrunner 1.7.7 py_0 conda-forge
xz 5.2.3 0 conda-forge
yaml 0.1.7 0 conda-forge
yarl 1.2.3 py35_0 conda-forge
zlib 1.2.11 0 conda-forge
The syntax error in snakemake/metacompass.iter0.py
was caused by placing the log:
rule after the shell:
rule.
Also, there's a syntax error in create_tsv.sh
, which creates the following error:
/ebio/abt3_projects/software/dev/tmp/MetaCompass/bin/create_tsv.sh: 22: [: NA: unexpected operator
if [ $recruited_ids !="NA" ] ; then
should be changed to if [ $recruited_ids != "NA" ] ; then
Here's a template .travis-ci
file that you could use for testing your repo:
language: python
python:
- "3.5"
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=$HOME/miniconda3/bin:$PATH
- conda update --yes conda
- conda config --add channels bioconda
install:
- conda install -c bioconda --yes snakemake bowtie2 blast meryl samtools megahit pilon
- bash install.sh
script:
- ./go_metacompass.py -r tutorial/Candidatus_Carsonella_ruddii_HT_Thao2000.fasta -P tutorial/thao2000.1.fq,tutorial/thao2000.2.fq -o example1_output -m 3 -t 4
- wget ftp://public-ftp.hmpdacc.org/Illumina/posterior_fornix/SRS044742.tar.bz2
- tar xvjf SRS044742.tar.bz2
- ./go_metacompass.py -P SRS044742/SRS044742.denovo_duplicates_marked.trimmed.1.fastq,SRS044742/SRS044742.denovo_duplicates_marked.trimmed.2.fastq -U SRS044742/SRS044742.denovo_duplicates_marked.trimmed.singleton.fastq -o example2_output
It should work as is, but I haven't tested it.
I can send a PR for this or the syntax error fixes if you'd like.
I'm trying to run the
MetaCompass
examples listed in the README, and I've run into errors for both.Install
Example 1
Command
Output
Example 2
Command
Output
Conda environment