damurdock / SIDR

Sequence Identification with Decision tRees
https://sidr.readthedocs.io
MIT License
8 stars 1 forks source link

error reading input files, arg list differs in documentation and program #1

Open muszewska opened 6 years ago

muszewska commented 6 years ago

The list of arguments differs in documentation and program

sidr default -d [taxdump path] -b [bamfile] -f [assembly FASTA] -r [BLAST results] -m model.dot -k tokeep.contigids -x toremove.contigids -t [target phylum]

Error: no such option: -m


reading in BAM file: Traceback (most recent call last): File "/usr/local/bin/sidr", line 11, in sys.exit(cli()) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sidr/cli.py", line 54, in default_runner default.runAnalysis(bam, fasta, blastresults, taxdump, modelOutput, output, tokeep, toremove, binary, target, level) File "/usr/local/lib/python2.7/dist-packages/sidr/default.py", line 106, in runAnalysis contigs = readBAM(bam, contigs) File "/usr/local/lib/python2.7/dist-packages/sidr/default.py", line 46, in readBAM alignment = pysam.AlignmentFile(BAMFile, "rb") AttributeError: 'module' object has no attribute 'AlignmentFile'

damurdock commented 6 years ago

Thank you for the heads-up on the first issue, I'll update the documentation to reflect the current state of SIDR.

As for the second issue, I believe this is the result of an older version of PySAM being used. Version 0.8.1 of PySAM introduced the method that SIDR uses to create file objects, and SIDR's setup script does not yet enforce a minimum version. Therefore, if an older version of PySAM was already installed on your machine, installing SIDR wouldn't update it and could result in that error. I'll update the setup script for SIDR to enforce a minimum version of PySAM so this will be avoided in the future.

Can you run the following command on the machine where SIDR is installed and tell me what it returns? python -c "import pysam; print(pysam.__version__)" If that returns something older than 0.8.1, running pip install --upgrade pysamshould fix the issue you're seeing. If you're running other software that doesn't work with the newer versions of PySAM, you can install SIDR in a virtualenv.

Thank you, Duncan

muszewska commented 6 years ago

Hi Duncan,

Indeed my pysam was 0.7.7 -> updated. Now I have to reformat NT to map on nucl_gb.accession2taxid.

Thank you, Anna

2018-08-09 23:14 GMT+02:00 Duncan Murdock notifications@github.com:

Thank you for the heads-up on the first issue, I'll update the documentation to reflect the current state of SIDR.

As for the second issue, I believe this is the result of an older version of PySAM being used. Version 0.8.1 of PySAM introduced the method that SIDR uses to create file objects, and SIDR's setup script does not yet enforce a minimum version. Therefore, if an older version of PySAM was already installed on your machine, installing SIDR wouldn't update it and could result in that error. I'll update the setup script for SIDR to enforce a minimum version of PySAM so this will be avoided in the future.

Can you run the following command on the machine where SIDR is installed and tell me what it returns? python -c "import pysam; print(pysam.version)" If that returns something older than 0.8.1, running pip install --upgrade pysamshould fix the issue you're seeing. If you're running other software that doesn't work with the newer versions of PySAM, you can install SIDR in a virtualenv.

Thank you, Duncan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/damurdock/SIDR/issues/1#issuecomment-411899371, or mute the thread https://github.com/notifications/unsubscribe-auth/AoDMDyR9vf3f5TpCMRUIKzbuDzXbm5lOks5uPKYngaJpZM4VqTR_ .

-- Anna Muszewska, PhD Institute of Biochemistry and Biophysics Polish Academy of Sciences