Skip to content

Commit 79b98e1

Browse files
authored
add plants; fix threshold (#4)
1 parent 0c5a09b commit 79b98e1

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

chill_filter_web/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ def get_md5(path):
136136
start = time.time()
137137
status = branch.do_fastmultigather(
138138
outpath,
139-
"prepare-db/animals-and-gtdb.rocksdb",
139+
# "prepare-db/animals-and-gtdb.rocksdb",
140+
"prepare-db/plants+animals+gtdb.rocksdb",
140141
0,
141142
KSIZE,
142143
SCALED,
@@ -157,7 +158,7 @@ def get_md5(path):
157158

158159
# load/process
159160
gather_df = pd.read_csv(csv_filename)
160-
gather_df = gather_df[gather_df["f_unique_weighted"] >= 0.1]
161+
gather_df = gather_df[gather_df["f_unique_weighted"] >= 0.001]
161162
if len(gather_df):
162163
last_row = gather_df.tail(1).squeeze()
163164
sum_weighted_found = last_row["sum_weighted_found"]

prepare-db/Snakefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ GENOMES = ['bosTau9',
1111
rule all:
1212
input:
1313
'animals-and-gtdb.rocksdb',
14+
'plants+animals+gtdb.rocksdb',
1415

1516
rule index_animals_and_gtdb:
1617
input:
@@ -32,6 +33,27 @@ rule animals_and_gtdb:
3233
"""
3334

3435

36+
rule index_plants_animals_and_gtdb:
37+
input:
38+
"plants+animals+gtdb.mf.csv",
39+
output:
40+
protected(directory("plants+animals+gtdb.rocksdb")),
41+
shell: """
42+
sourmash scripts index {input} -o {output} -k 51
43+
"""
44+
45+
rule plants_animals_and_gtdb:
46+
input:
47+
expand('outputs/{g}.k51.100k.sig.zip', g=GENOMES),
48+
'outputs/all-gtdb-rs220.k51.100k.sig.zip',
49+
'downloads/genbank-plants-merged-2024.07.sig.zip',
50+
output:
51+
'plants+animals+gtdb.mf.csv',
52+
shell: """
53+
sourmash sig collect -F csv {input} -o {output} --abspath
54+
"""
55+
56+
3557
rule downsample:
3658
input:
3759
"downloads/{g}.sig.zip",

0 commit comments

Comments
 (0)