transcript / cog Goto Github PK
View Code? Open in Web Editor NEWScripts and steps for making a consolidated COG database file for tools like DIAMOND.
Scripts and steps for making a consolidated COG database file for tools like DIAMOND.
Hi MR. SAM,
when i am runing DIAMOND_COG_analysis_counter.py, error encountered:
(base) [wfangab@login-0 annotation]$ python DIAMOND_COG_analysis_counter.py -I test.cogs -O result.cogs -D merged_cogs.fa
Analysis of test.cogs complete.
Number of total lines: 4863
Number of unique sequences: 250
Time elapsed: 0.01116103120148182 seconds.
Starting database analysis now.
Traceback (most recent call last):
File "/home/wfangab/COG/annotation/DIAMOND_COG_analysis_counter.py", line 125, in <module>
db_id = str(splitline[0] + "|" + splitline[1] + "|" + splitline[2] + "|" + splitline[3] + "|")[1:]
IndexError: list index out of range
Then I found out that the head of 'merged_cogs.fa' is not the same as it shows in github.
Here is an example of my head:
ABK77980.1 glutamate-1-semialdehyde aminotransferase [Cenarchaeum symbiosum A] | COG0001 | H
Could you please help with it?
Best,
Ben
Hi Mr Sam,
Thank you for your contribution!
I have some issue when running the merger.py file.
On my terminal, I face a index error. Unfortunately I am just a beginner in Linux and just trying to annotate my data using KOG database. I have already unzipped the pro2003-2014.fa and the other two were left as it. All 4 files, including merger.py is in the same directory/
Thank you for your time!
My error in Terminal :-
ray@rain:/Downloads/COG-master$ source /home/ray/anaconda2/bin/activate/Downloads/COG-master$ python merger.py prot2003-2014.fa cog2003-2014.csv cognames2003-2014.tab
(base) ray@rain:
Traceback (most recent call last):
File "merger.py", line 16, in
cog_db[split[0]] = split[6] # GI ID == COG ID
IndexError: list index out of range
My error in Spyder (Python 2.7) Console :-
runfile('/home/ray/Downloads/COG-master/merger.py', wdir='/home/ray/Downloads/COG-master')
Traceback (most recent call last):
File "", line 1, in
runfile('/home/ray/Downloads/COG-master/merger.py', wdir='/home/ray/Downloads/COG-master')
File "/home/ray/anaconda2/lib/python2.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/home/ray/anaconda2/lib/python2.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 102, in execfile
builtins.execfile(filename, *where)
File "/home/ray/Downloads/COG-master/merger.py", line 5, in
prot_file = open(sys.argv[1], "r") # prot2003-2014.fa (note: unzipped)
IndexError: list index out of range
Hi Sam,
thanks for sharing your code on GitHub. Your scripts work smoothly. I was just wondering if you were planing to update your merge.py script to process the updated COG2020 database file formats.
Reference
https://academic.oup.com/nar/article/49/D1/D274/5964069
ftp://ftp.ncbi.nih.gov/pub/COG/COG2020/data
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.