pomo-dev / cflib Goto Github PK
View Code? Open in Web Editor NEWA library to create and handle counts files used with PoMo.
License: MIT License
A library to create and handle counts files used with PoMo.
License: MIT License
Hi,
First of all thank you for making available this software.
When I coded my identifiers as follows: for example '>pop1-subpop1-ind1' the identifier was stripped at the second dash, instead of the first dash (which is how it is supposed to work according to the documentation).
Cheers
Hello Mr Schrempf,
I am a student at the Ngere laboratory in Nancy and as part of my internship, I have to convert fasta files into a .vcf file in order to keep only the mutations present in the sequences, a step that can be carried out using your python script FastaToVCF.py, script allowing to convert only one fasta sequence at a time if it is exact.
But then I am asked from the .vcf files obtained, to convert them into fasta and therefore obtain the fasta sequences with the mutations included.
Do you know if this is possible with your scripts? by digging into the different scripts in the cflib folder and rearranging for example.
Thank you in advance for your answer !
Hello
I'm running Python 3.11.14 on MacOS Monterrey.
When executing
vcf_files=(p1.vcf.gz p2.vcf.gz p3.vcf.gz p4.vcf.gz)
python3 FastaVCFToCounts.py anc.fa.gz "${vcf_files[@]}" example_from_fasta_vcf.cf --merge --ploidy 2
I get error
File "/Users/sb442/Documents/work/DataConversion/cflib/cflib/cf.py", line 766, in __snp
raise StopIteration()
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/sb442/Documents/work/DataConversion/cflib/scripts/FastaVCFToCounts.py", line 122, in <module>
cfw.write_Rn(rg)
File "/Users/sb442/Documents/work/DataConversion/cflib/cflib/cf.py", line 1005, in write_Rn
(nI, nSNP) = next(snpsG)
^^^^^^^^^^^
RuntimeError: generator raised StopIteration
When I remove line 766 in cf.py raise StopIteration()
everything seems to work fine. I get reasonable outputs but I'm not sure if this fix breaks anything else.
Many thanks
Svitlana
Hello!
I have been trying to make a count file using the above-mentioned script (installed via pip3).
First, I have created one vcf per population/species (using vcftools), then I used the script as follows:
FastaVCFToCounts.py reference.fasta Pop1.vcf.gz Pop2.vcf.gz Pop3.vcf.gz Pop4.vcf.gz test.counts.gz -p 1 -m
but I am getting the following error:
File "/home/wagner/.local/bin/FastaVCFToCounts.py", line 114, in
cfw.write_Rn(rg)
File "/home/wagner/.local/lib/python3.6/site-packages/cflib/cf.py", line 1002, in write_Rn
self.__fill_cD(iL, snpL)
File "/home/wagner/.local/lib/python3.6/site-packages/cflib/cf.py", line 896, in __fill_cD
bI = dna[altBases[spData[i][d]-1]]
KeyError: '*'
What could be the mistake here?
Thank you in advance!
Hi, I'm encountering an error trying to execute the above script.
I've previously tried to install cflib-pomo using pip, but encountered the error with scipy (which I believed you've fixed on an upload to git):
## installed cfllb-pomo from with pip
Traceback (most recent call last):
File "/home/junhoe/.local/bin/FastaToCounts.py", line 13, in <module>
import cflib.fasta as fa
File "/home/junhoe/.local/lib/python3.6/site-packages/cflib/__init__.py", line 12, in <module>
import cflib.main
File "/home/junhoe/.local/lib/python3.6/site-packages/cflib/main.py", line 12, in <module>
from scipy.misc import comb as choose
ImportError: cannot import name 'comb'
Thus I've installed cflib-pomo manually with:
setup.py build
setup.py install
However,now I'm encountering the following error
FastaToCounts.py populations.samples-raw.fa.gz pop.samples-raw.counts.gz --verbose
Traceback (most recent call last):
File "/lustre/projects/project-junhoe/conda/envs/phylo/bin/FastaToCounts.py", line 4, in <module>
__import__('pkg_resources').run_script('cflib-pomo==1.2.1', 'FastaToCounts.py')
File "/lustre/projects/project-junhoe/conda/envs/phylo/lib/python3.6/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/lustre/projects/project-junhoe/conda/envs/phylo/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1470, in run_script
exec(script_code, namespace, namespace)
File "/lustre/projects/project-junhoe/conda/envs/phylo/lib/python3.6/site-packages/cflib_pomo-1.2.1-py3.6.egg/EGG-INFO/scripts/FastaToCounts.py", line 70, in <module>
File "/lustre/projects/project-junhoe/conda/envs/phylo/lib/python3.6/site-packages/cflib_pomo-1.2.1-py3.6.egg/cflib/cf.py", line 308, in fasta_to_cf
TypeError: exceptions must derive from BaseException
Thanks in advance!
Installed cflib with easy_install3 on both a Linux and an OS X machine.
I get this error when I try to run a script:
python FastaToCounts.py --help
Traceback (most recent call last):
File "FastaToCounts.py", line 13, in
import cflib.fasta as fa
ImportError: No module named 'cflib.fasta'
I'm sure this is probably an issue with installing cflib. I'd appreciate a more detailed guide.
Hello i am trying to convert a fasta file to a vcf one using this tool. But i keep getting the same error:
raise sb.SequenceDataError(cflib.seqbase.SequenceDataError: Sequence 2 has different length than reference.
How can i solve it?
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.