Skip to content

Commit

Permalink
fixes #61; consider also #58
Browse files Browse the repository at this point in the history
  • Loading branch information
hariszaf committed Dec 11, 2023
1 parent cc3febe commit 552a21c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pema_docker_image/modules/clustering.bds
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ string clusteringSwarm(string{} params, string{} globalVars) {
sys cp asvs_representatives_all_samples.fasta asvs_repr_with_singletons.fasta
sys python $globalVars{'path'}/scripts/removeOligotonsSwarm.py asvs_representatives_all_samples.fasta $params{'numOligotons'}
sys mv no_oligotons.tsv asvs_representatives_all_samples.fasta
sys awk -v threshold=$params{'numOligotons'} '$4 > threshold || NR == 1' asvs_contingency_table.tsv > asvs_contingency_table.noOligos
sys mv asvs_contingency_table.tsv asvs_contingency_table_oligotons_included.tsv
sys mv asvs_contingency_table.noOligos asvs_contingency_table.tsv
println('Oligotons have been removed')
}

Expand All @@ -159,14 +162,20 @@ string clusteringSwarm(string{} params, string{} globalVars) {


task {

sys bash $globalVars{'path'}/scripts/buildAllTableFile.sh

sys mv allTab.tsv allTab_$params{'taxonomyFolderName'}.tsv
}

wait

if (params{'clusteringAlgo'} == "algo_Swarm"){
sys sed -i 's/Otu/ASV/g' asvs_representatives_all_samples.fasta
sys sed -i 's/Otu/ASV/g' allTab.tsv
}

sys mv allTab.tsv allTab_$params{'taxonomyFolderName'}.tsv

wait

} else if ( params{'classifierAlgo'} == 'CREST' && (params{'gene'} != 'gene_COI' || params{'gene'} != 'gene_12S' ) ) {

println('You have selected CREST classifier and your marker gene is COI. Pema does not support this combination.')
Expand Down

0 comments on commit 552a21c

Please sign in to comment.