Skip to content

Commit

Permalink
Updated installation
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNickols committed Dec 7, 2023
1 parent 901e1f5 commit 7e9729e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.DS_Store
35 changes: 31 additions & 4 deletions assembly_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
- biobakery_workflows=3.1=pyh0d95946_0
- biom-format=2.1.10=py38h6c62de6_1
- biopython=1.80=py38h0a891b7_0
- blas=1.1=openblas
- blas=1.0=openblas
- blast=2.13.0=hf3cf87c_0
- bleach=5.0.1=pyhd8ed1ab_0
- blinker=1.5=pyhd8ed1ab_0
Expand All @@ -44,15 +44,16 @@ dependencies:
- bx-python=0.9.0=py38h616c765_0
- bzip2=1.0.8=h7f98852_4
- c-ares=1.18.1=h7f98852_0
- ca-certificates=2022.12.7=ha878542_0
- ca-certificates=2023.11.17=hbcca054_0
- cached-property=1.5.2=hd8ed1ab_1
- cached_property=1.5.2=pyha770c72_1
- cachetools=4.2.4=pyhd8ed1ab_0
- cairo=1.16.0=h18b612c_1001
- capnproto=0.10.2=h6239696_0
- certifi=2022.12.7=pyhd8ed1ab_0
- certifi=2023.11.17=pyhd8ed1ab_0
- cffi=1.15.1=py38h4a40e3a_3
- charset-normalizer=2.1.1=pyhd8ed1ab_0
- checkm2=1.0.1=pyh7cba7a3_0
- click=8.1.3=py38h578d9bd_1
- cloudpickle=2.2.0=pyhd8ed1ab_0
- cmseq=1.0.4=pyhb7b1952_0
Expand Down Expand Up @@ -201,7 +202,7 @@ dependencies:
- openblas=0.3.21=pthreads_h320a7e8_3
- openjdk=11.0.1=h516909a_1016
- openjpeg=2.5.0=h7d73246_1
- openssl=1.1.1s=h0b41bf4_1
- openssl=1.1.1w=hd590300_0
- opt_einsum=3.3.0=pyhd8ed1ab_1
- packaging=22.0=pyhd8ed1ab_0
- pandas=1.4.0=py38h43a58ef_0
Expand Down Expand Up @@ -271,21 +272,47 @@ dependencies:
- r-base=4.2.0=h1ae530e_0
- r-boot=1.3_28=r42h6115d3f_0
- r-class=7.3_20=r42h76d94ec_0
- r-cli=3.6.1=r42ha503ecb_1
- r-cluster=2.1.3=r42h640688f_0
- r-codetools=0.2_18=r42h6115d3f_0
- r-crayon=1.5.2=r42hc72bb7e_2
- r-data.table=1.14.8=r42h029312a_2
- r-docopt=0.7.1=r42hc72bb7e_3
- r-doparallel=1.0.17=r42hc72bb7e_2
- r-dplyr=1.1.4=r42ha503ecb_0
- r-ellipsis=0.3.2=r42h57805ef_2
- r-fansi=1.0.5=r42h57805ef_0
- r-foreach=1.5.2=r42hc72bb7e_2
- r-foreign=0.8_82=r42h76d94ec_0
- r-generics=0.1.3=r42hc72bb7e_2
- r-glue=1.6.2=r42h57805ef_2
- r-iterators=1.0.14=r42hc72bb7e_2
- r-kernsmooth=2.23_20=r42h640688f_0
- r-lattice=0.20_45=r42h76d94ec_0
- r-lifecycle=1.0.4=r42hc72bb7e_0
- r-magrittr=2.0.3=r42h57805ef_2
- r-mass=7.3_57=r42h76d94ec_0
- r-matrix=1.4_1=r42h76d94ec_0
- r-mgcv=1.8_40=r42h76d94ec_0
- r-nlme=3.1_157=r42h640688f_0
- r-nnet=7.3_17=r42h76d94ec_0
- r-pillar=1.9.0=r42hc72bb7e_1
- r-pkgconfig=2.0.3=r42hc72bb7e_3
- r-purrr=1.0.2=r42h57805ef_0
- r-r6=2.5.1=r42hc72bb7e_2
- r-recommended=4.2=r42hd8ed1ab_1005
- r-rlang=1.1.2=r42ha503ecb_0
- r-rpart=4.1.16=r42h76d94ec_0
- r-spatial=7.3_15=r42h76d94ec_0
- r-stringi=1.7.6=r42h884c59f_0
- r-stringr=1.5.1=r42h785f33e_0
- r-survival=3.3_1=r42h76d94ec_0
- r-tibble=3.2.1=r42h57805ef_2
- r-tidyr=1.3.0=r42ha503ecb_1
- r-tidyselect=1.2.0=r42hc72bb7e_1
- r-utf8=1.2.4=r42h57805ef_0
- r-vctrs=0.6.5=r42ha503ecb_0
- r-withr=2.5.2=r42hc72bb7e_0
- raxml=8.2.12=hec16e2b_4
- re2=2021.04.01=h9c3ff4c_0
- readline=8.1.2=h0f457ee_0
Expand Down
25 changes: 22 additions & 3 deletions assembly_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def list_depends(name, step, paired):
else:
return [str(name + pair_identifier + "." + input_extension), str(name + pair_identifier_2 + "." + input_extension)]
elif paired == "concatenated":
return [str(deconcatenated_dir + name.split("/")[-1] + ".done"), list_paired]
return [str(deconcatenated_dir + name.split("/")[-1] + ".done"), list_paired, scratch + "searched/paired_list.txt"]
else:
return [str(name + "." + input_extension)]
elif step == "align":
Expand Down Expand Up @@ -381,6 +381,11 @@ def deconcatenate(name):
command = "if grep -q -m 1 /2$ " + name + "." + input_extension + "; then echo " + name + "." + input_extension + " >> " + list_paired + "; fi && touch " + searched_dir + name.split("/")[-1] + "_searched.log"
workflow.add_task(command, depends=[name + "." + input_extension], targets = [searched_dir + name.split("/")[-1] + "_searched.log", list_paired], name="Create paired/unpaired list")

command = "mkdir -p " + scratch + "searched/ && cp " + list_paired + " " + scratch + "searched/paired_list.txt"
depends_list = [searched_dir + name.split("/")[-1] + "_searched.log" for name in names]
depends_list.append(list_paired)
workflow.add_task(command, depends=depends_list, targets = [scratch + "searched/paired_list.txt"], name="Create paired/unpaired list")

for name in names:
workflow.add_task_gridable(deconcatenate(name),
depends=list_depends(name=name, step="deconcatenate", paired="concatenated"),
Expand Down Expand Up @@ -871,8 +876,15 @@ def copy_bins(name):
command = "cat " + qa_unmerged_dir + name.split("/")[-1] + "/quality_report.tsv > " + qa_dir + "quality_report.tsv"
depends_list.append(qa_unmerged_dir + name.split("/")[-1] + "/quality_report.tsv")
else:
command = command + " && tail -n +2 " + qa_unmerged_dir + name.split("/")[-1] + "/quality_report.tsv >> " + qa_dir + "quality_report.tsv"
depends_list.append(qa_unmerged_dir + name.split("/")[-1] + "/quality_report.tsv")

with open(qa_dir + "quality_report_merge_list.txt", 'w') as f:
for count, depend in enumerate(depends_list):
if count != 0:
f.write(depend + '\n')

command = command + " && cat " + qa_dir + "quality_report_merge_list.txt" + " | while read line; do tail -n +2 $line >> " + qa_dir + "quality_report.tsv; done"

workflow.add_task(command,
depends = depends_list,
targets = qa_dir + "quality_report.tsv",
Expand Down Expand Up @@ -916,8 +928,15 @@ def copy_bins(name):
command = "cat " + phylophlan_unmerged_dir + name.split("/")[-1] + "/" + "phylophlan_out.tsv > " + phylophlan_dir + "phylophlan_out.tsv"
depends_list.append(phylophlan_unmerged_dir + name.split("/")[-1] + "/" + "phylophlan_out.tsv")
else:
command = command + " && tail -n +5 " + phylophlan_unmerged_dir + name.split("/")[-1] + "/" + "phylophlan_out.tsv >> " + phylophlan_dir + "phylophlan_out.tsv"
depends_list.append(phylophlan_unmerged_dir + name.split("/")[-1] + "/" + "phylophlan_out.tsv")

command = command + " && cat " + phylophlan_dir + "phylophlan_merge_list.txt" + " | while read line; do tail -n +5 $line >> " + phylophlan_dir + "phylophlan_out.tsv; done"

with open(phylophlan_dir + "phylophlan_merge_list.txt", 'w') as f:
for count, depend in enumerate(depends_list):
if count != 0:
f.write(depend + '\n')

workflow.add_task(command,
depends = depends_list,
targets = phylophlan_dir + "phylophlan_out.tsv",
Expand Down

0 comments on commit 7e9729e

Please sign in to comment.