diff --git a/pema_docker_image/modules/clustering.bds b/pema_docker_image/modules/clustering.bds index 6dd3a21..a3f995d 100755 --- a/pema_docker_image/modules/clustering.bds +++ b/pema_docker_image/modules/clustering.bds @@ -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') } @@ -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.')