Gitlab Premium Edition
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
apscale4clowm
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gfbio
apscale4clowm
Commits
ce03aa9a
Commit
ce03aa9a
authored
1 year ago
by
Linus Franz
Browse files
Options
Downloads
Patches
Plain Diff
reduce script to just the smallest possible i-o
parent
5e819ce8
Branches
small-test
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.nf
+89
-87
89 additions, 87 deletions
main.nf
with
89 additions
and
87 deletions
main.nf
+
89
−
87
View file @
ce03aa9a
...
...
@@ -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"
"""
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment