Gitlab Premium Edition

Skip to content
Snippets Groups Projects
Commit ce03aa9a authored by Linus Franz's avatar Linus Franz
Browse files

reduce script to just the smallest possible i-o

parent 5e819ce8
Branches small-test
No related tags found
No related merge requests found
......@@ -32,94 +32,96 @@ process copy_files_from_bucket_to_demultiplexing {
path("project_apscale/*")
script: """
# Create the apscale-Project
# apscale --create_project project
mkdir -p project_apscale/2_demultiplexing/data/
# Copy data from bucket to demultiplexing
find ${filepath}/* -regex ".*\\\\.fastq\\\\.gz" -exec cp {} project_apscale/2_demultiplexing/data/ \\;
find ${filepath}/* -regex ".*\\\\.fastq" -exec cp {} project_apscale/2_demultiplexing/data/ \\;
# Getting a prepared Settings-file and prepare it for exchanging the placeholders
cp -f ../../../settings_with_placeholders.xlsx .
DIR=unzipped_settings
mkdir \$DIR
unzip -d \$DIR settings_with_placeholders.xlsx
# Exchanging the placeholders with the given values
# Because booleans are strings in xlsx and strings are saved as ids in tables refering to the sharedStrings.xml
# False == 8, True == 15
sed -i "s/placeholder_maxdiffpct/$params.pe_merging_maxdiffpct/g" \$DIR/xl/worksheets/sheet2.xml
sed -i "s/placeholder_maxdiffs/$params.pe_merging_maxdiffs/g" \$DIR/xl/worksheets/sheet2.xml
sed -i "s/placeholder_minovlen/$params.pe_merging_minovlen/g" \$DIR/xl/worksheets/sheet2.xml
if [ "$params.primer_trimming_anchoring" = "true" ]
then
sed -i "s/placeholder_anchoring/15/g" \$DIR/xl/worksheets/sheet3.xml
else
sed -i "s/placeholder_anchoring/8/g" \$DIR/xl/worksheets/sheet3.xml
fi
sed -i "s/placeholder_max_ee/$params.quality_filtering_max_ee/g" \$DIR/xl/worksheets/sheet4.xml
sed -i "s/placeholder_min_length/$params.quality_filtering_min_length/g" \$DIR/xl/worksheets/sheet4.xml
sed -i "s/placeholder_max_length/$params.quality_filtering_max_length/g" \$DIR/xl/worksheets/sheet4.xml
sed -i "s/placeholder_min_size_to_pool/$params.dereplication_pooling_size_of_pool/g" \$DIR/xl/worksheets/sheet5.xml
sed -i "s/placeholder_pct_id/$params.otu_clustering_pct_id/g" \$DIR/xl/worksheets/sheet6.xml
if [ "$params.otu_clustering_to_excel" = "true" ]
then
sed -i "s/placeholder_otu_clusterung_to_excel/15/g" \$DIR/xl/worksheets/sheet6.xml
else
sed -i "s/placeholder_otu_clusterung_to_excel/8/g" \$DIR/xl/worksheets/sheet6.xml
fi
sed -i "s/placeholder_alpha/$params.denoising_alpha/g" \$DIR/xl/worksheets/sheet7.xml
sed -i "s/placeholder_minsize/$params.denoising_minsize/g" \$DIR/xl/worksheets/sheet7.xml
if [ "$params.denoising_to_excel" = "true" ]
then
sed -i "s/placeholder_denoising_to_excel/15/g" \$DIR/xl/worksheets/sheet7.xml
else
sed -i "s/placeholder_denoising_to_excel/8/g" \$DIR/xl/worksheets/sheet7.xml
fi
sed -i "s/placeholder_minimum_similarity/$params.lulu_filtering_minimum_similarity/g" \$DIR/xl/worksheets/sheet8.xml
sed -i "s/placeholder_minimum_relative_cooccurence/$params.lulu_filtering_minimum_relative_cooccurence/g" \$DIR/xl/worksheets/sheet8.xml
sed -i "s/placeholder_minimum_ratio/$params.lulu_filtering_minimum_ratio/g" \$DIR/xl/worksheets/sheet8.xml
if [ "$params.lulu_filtering_to_excel" = "true" ]
then
sed -i "s/placeholder_lulu_to_excel/15/g" \$DIR/xl/worksheets/sheet8.xml
else
sed -i "s/placeholder_lulu_to_excel/8/g" \$DIR/xl/worksheets/sheet8.xml
fi
sed -i "s/placeholder_p5_primer/$params.primer_trimming_p5_primer/g" \$DIR/xl/sharedStrings.xml
sed -i "s/placeholder_p7_primer/$params.primer_trimming_p7_primer/g" \$DIR/xl/sharedStrings.xml
#Zipping the settings-sheets back into a one Settings-File and replacing the one in the project
cd \$DIR
zip -r ../Settings.xlsx *
cd ..
cp -f Settings.xlsx project_apscale/Settings.xlsx
# Run the actual apscale-Project
# apscale --run_apscale "project_apscale"
echo Hello World > project_apscale/2_demultiplexing/data/out.txt
# # Create the apscale-Project
# # apscale --create_project project
# mkdir -p project_apscale/2_demultiplexing/data/
# # Copy data from bucket to demultiplexing
# find ${filepath}/* -regex ".*\\\\.fastq\\\\.gz" -exec cp {} project_apscale/2_demultiplexing/data/ \\;
# find ${filepath}/* -regex ".*\\\\.fastq" -exec cp {} project_apscale/2_demultiplexing/data/ \\;
#
# # Getting a prepared Settings-file and prepare it for exchanging the placeholders
# cp -f ../../../settings_with_placeholders.xlsx .
# DIR=unzipped_settings
# mkdir \$DIR
# unzip -d \$DIR settings_with_placeholders.xlsx
#
#
#
# # Exchanging the placeholders with the given values
# # Because booleans are strings in xlsx and strings are saved as ids in tables refering to the sharedStrings.xml
# # False == 8, True == 15
#
# sed -i "s/placeholder_maxdiffpct/$params.pe_merging_maxdiffpct/g" \$DIR/xl/worksheets/sheet2.xml
# sed -i "s/placeholder_maxdiffs/$params.pe_merging_maxdiffs/g" \$DIR/xl/worksheets/sheet2.xml
# sed -i "s/placeholder_minovlen/$params.pe_merging_minovlen/g" \$DIR/xl/worksheets/sheet2.xml
#
#
# if [ "$params.primer_trimming_anchoring" = "True" ]
# then
# sed -i "s/placeholder_anchoring/15/g" \$DIR/xl/worksheets/sheet3.xml
# else
# sed -i "s/placeholder_anchoring/8/g" \$DIR/xl/worksheets/sheet3.xml
# fi
#
#
# sed -i "s/placeholder_max_ee/$params.quality_filtering_max_ee/g" \$DIR/xl/worksheets/sheet4.xml
# sed -i "s/placeholder_min_length/$params.quality_filtering_min_length/g" \$DIR/xl/worksheets/sheet4.xml
# sed -i "s/placeholder_max_length/$params.quality_filtering_max_length/g" \$DIR/xl/worksheets/sheet4.xml
#
#
# sed -i "s/placeholder_min_size_to_pool/$params.dereplication_pooling_size_of_pool/g" \$DIR/xl/worksheets/sheet5.xml
#
#
# sed -i "s/placeholder_pct_id/$params.otu_clustering_pct_id/g" \$DIR/xl/worksheets/sheet6.xml
#
# if [ "$params.otu_clustering_to_excel" = "True" ]
# then
# sed -i "s/placeholder_otu_clusterung_to_excel/15/g" \$DIR/xl/worksheets/sheet6.xml
# else
# sed -i "s/placeholder_otu_clusterung_to_excel/8/g" \$DIR/xl/worksheets/sheet6.xml
# fi
#
#
# sed -i "s/placeholder_alpha/$params.denoising_alpha/g" \$DIR/xl/worksheets/sheet7.xml
# sed -i "s/placeholder_minsize/$params.denoising_minsize/g" \$DIR/xl/worksheets/sheet7.xml
#
# if [ "$params.denoising_to_excel" = "True" ]
# then
# sed -i "s/placeholder_denoising_to_excel/15/g" \$DIR/xl/worksheets/sheet7.xml
# else
# sed -i "s/placeholder_denoising_to_excel/8/g" \$DIR/xl/worksheets/sheet7.xml
# fi
#
#
# sed -i "s/placeholder_minimum_similarity/$params.lulu_filtering_minimum_similarity/g" \$DIR/xl/worksheets/sheet8.xml
# sed -i "s/placeholder_minimum_relative_cooccurence/$params.lulu_filtering_minimum_relative_cooccurence/g" \$DIR/xl/worksheets/sheet8.xml
# sed -i "s/placeholder_minimum_ratio/$params.lulu_filtering_minimum_ratio/g" \$DIR/xl/worksheets/sheet8.xml
#
# if [ "$params.lulu_filtering_to_excel" = "True" ]
# then
# sed -i "s/placeholder_lulu_to_excel/15/g" \$DIR/xl/worksheets/sheet8.xml
# else
# sed -i "s/placeholder_lulu_to_excel/8/g" \$DIR/xl/worksheets/sheet8.xml
# fi
#
#
# sed -i "s/placeholder_p5_primer/$params.primer_trimming_p5_primer/g" \$DIR/xl/sharedStrings.xml
# sed -i "s/placeholder_p7_primer/$params.primer_trimming_p7_primer/g" \$DIR/xl/sharedStrings.xml
#
#
#
# #Zipping the settings-sheets back into a one Settings-File and replacing the one in the project
# cd \$DIR
# zip -r ../Settings.xlsx *
# cd ..
# cp -f Settings.xlsx project_apscale/Settings.xlsx
#
#
# # Run the actual apscale-Project
# # apscale --run_apscale "project_apscale"
"""
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment