segatalab / cmseq Goto Github PK
View Code? Open in Web Editor NEWSet of utilities on sequences and BAM files
License: MIT License
Set of utilities on sequences and BAM files
License: MIT License
Hi there,
I'm new to cmseq, but it looks like a very recent change to Biopython (Bio.Alphabet removal) has led to the following error.
consensus.py --help
Traceback (most recent call last):
File "/users/ibishop/anaconda/proov/bin/consensus.py", line 7, in <module>
from cmseq.consensus import consensus_from_file
File "/users/ibishop/anaconda/proov/lib/python3.8/site-packages/cmseq/consensus.py", line 9, in <module>
from Bio.Alphabet import IUPAC
File "/users/ibishop/anaconda/proov/lib/python3.8/site-packages/Bio/Alphabet/__init__.py", line 20, in <module>
raise ImportError(
ImportError: Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information.
I installed via bioconda.
Any help or clarification is much appreciated! -i
Dear developer / SegataLab,
Thank you for the useful tool!
The poly.py worked great for my MAGs analysis for SNPs, however the polymut.py did not work.
You have written in the doc: "Please supply a gff file from roary and make sure that the contig names between the bam file and the gff file can be matched.".
Roary does not output a gff file, but rather Prokka produce gff file that can be used with Roary - is this what you meant? (this gff file has both gene annotations and the nucleotide sequence of the contigs). I have confiremd the matching of the contigs header.
When I run polymut.py with the bam and gff files of my MAG, after 10-20min it finished without any errors, but the output file had just 3 numbers in a single line (65.0 79.0 4169686.0).
Any ideas / advises will be greatly welcomed.
Lastly, for CMSeq requirements need to be added: Bio and bcbio-gff modules.
Best regards
Vadim
Hi folks โ while Conda shows this project as MIT-licensed (and I know that's what you've typically used), there is not a LICENSE
file in the repository nor in setup.py
.
Could you clarify the intended license and add a file/line to setup.py
as appropriate? Many thanks!
So i put 50 contigs to the input pipeline breadth_depth.py, but only 49 came out, what could have caused this result?
Hi
Thanks for a great tool. It is really valuable to be able to calculate SNP frequencies.
Any chance that poly.py will support multithreading?
Best regards
Rasmus
Hi fbeghini
would you please offer an example folder to test this software?
Thanks very much!
Hi there,
I'm trying to run polymut.py on a sorted, indexed bam and gff file output from Prokka as follows:
polymut.py --mincov 10 --gff_file test_prokka.gff test.bam
and I am getting the following error:
Traceback (most recent call last):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/Bio/SeqIO/Interfaces.py", line 42, in __init__
self.stream = open(source, "r" + mode)
TypeError: expected str, bytes or os.PathLike object, not FakeHandle
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/bin/polymut.py", line 10, in <module>
sys.exit(polymut_from_file())
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/cmseq/polymut.py", line 33, in polymut_from_file
bf.parse_gff(args.gff_file)
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/cmseq/cmseq.py", line 115, in parse_gff
for rec in GFF.parse(in_handle):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/BCBio/GFF/GFFParser.py", line 746, in parse
target_lines):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/BCBio/GFF/GFFParser.py", line 322, in parse_in_parts
for results in self.parse_simple(gff_files, limit_info, target_lines):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/BCBio/GFF/GFFParser.py", line 343, in parse_simple
for results in self._gff_process(gff_files, limit_info, target_lines):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/BCBio/GFF/GFFParser.py", line 637, in _gff_process
for out in self._lines_to_out_info(line_gen, limit_info, target_lines):
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/BCBio/GFF/GFFParser.py", line 699, in _lines_to_out_info
fasta_recs = self._parse_fasta(FakeHandle(line_iter))
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/BCBio/GFF/GFFParser.py", line 560, in _parse_fasta
return list(SeqIO.parse(in_handle, "fasta"))
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/Bio/SeqIO/__init__.py", line 627, in parse
i = iterator_generator(handle)
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/Bio/SeqIO/FastaIO.py", line 181, in __init__
super().__init__(source, alphabet=alphabet, mode="t", fmt="Fasta")
File "/gstore/scratch/u/tamburif/miniconda3_envs/cmseq/lib/python3.7/site-packages/Bio/SeqIO/Interfaces.py", line 46, in __init__
if source.read(0) != "":
TypeError: read() takes 1 positional argument but 2 were given
I can confirm that the contig names match between the bam and gff files.
I'm using the latest conda version (1.0) and it would be very helpful to keep using conda so that I can incorporate this analysis into a Snakemake workflow. I did try cloning this repo and running the script from there to try and troubleshoot whether the problem was with the conda version or my specific files, but I got a different error in doing so:
Traceback (most recent call last):
File "/gstore/home/tamburif/tools/cmseq/cmseq/polymut.py", line 6, in <module>
from .cmseq import CMSEQ_DEFAULTS
ImportError: attempted relative import with no known parent package
Your help is much appreciated! Thank you!
Fiona
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.