-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
push to version 3.1.0 of mOTUs. Fixed some issues with newlines in a …
…mOTUs db file. Added script that creates a fake taxonomy for added genomes
- Loading branch information
Hans-Joachim Ruscheweyh
committed
Jun 23, 2023
1 parent
dd15f79
commit 8061921
Showing
15 changed files
with
4,611 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sys | ||
|
||
|
||
novel = set() | ||
with open(sys.argv[1]) as handle: | ||
for line in handle: | ||
if 'Novel' in line: | ||
genome = line.strip().split('\t')[0] | ||
novel.add(genome) | ||
#with open('test/genomes.tax') as handle: | ||
# for line in handle: | ||
# line = line.strip().split('\t') | ||
# print(line) | ||
|
||
for n in sorted(list(novel)): | ||
tmp = [n] + ['0 NA'] * 7 | ||
tmp = '\t'.join(tmp) | ||
print(tmp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import sys | ||
|
||
input_file = sys.argv[1] | ||
output_file = sys.argv[2] | ||
mgs = ['COG0172','COG0012','COG0215','COG0525','COG0495','COG0541','COG0533','COG0552','COG0016','COG0018'] | ||
with open(input_file) as inhandle, open(output_file, 'w') as outhandle: | ||
for line in inhandle: | ||
|
||
splits = line.strip().split() | ||
gene = splits[0] | ||
genome = splits[1] | ||
thismg = [] | ||
for mg in mgs: | ||
if mg in gene: | ||
thismg.append(mg) | ||
if len(thismg) != 1: | ||
print('Either no MG or multiple MGs are found. SHould find exactly one. Quitting') | ||
exit(1) | ||
cog = thismg[0] | ||
#cog = 'COG' + gene.split('.COG')[1].split('.')[0].split('-')[0] | ||
#print(gene, genome, cog) | ||
outhandle.write(f'{gene}\t{genome}\t{cog}\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.