Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ChIPster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xavier Grand
ChIPster
Commits
b92686a4
Verified
Commit
b92686a4
authored
3 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
flexi_splitter: fixed group_fastq process
parent
6cc2e1a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nf_modules/flexi_splitter/main.nf
+29
-17
29 additions, 17 deletions
src/nf_modules/flexi_splitter/main.nf
with
29 additions
and
17 deletions
src/nf_modules/flexi_splitter/main.nf
+
29
−
17
View file @
b92686a4
...
...
@@ -10,16 +10,14 @@ workflow split {
reads
config
main:
split_file(reads, config)
split_file.out.fastq.view()
split_fastq(reads, config)
group_fastq(split_fastq.out.fastq_folder)
emit:
fastq =
split_file
.out.fastq
fastq =
group_fastq
.out.fastq
}
process split_f
ile
{
process split_f
astq
{
// You can get an example of config file here:
// src/nf_modules/flexi_splitter/marseq_flexi_splitter.yaml
container = "${container_url}"
...
...
@@ -34,7 +32,7 @@ process split_file {
tuple val(config_id), path(config)
output:
tuple val(file_id), path("
results/*
"), emit: fastq
tuple val(file_id), path("
split
"), emit: fastq
_folder
script:
if (file_id instanceof List){
...
...
@@ -46,19 +44,33 @@ process split_file {
if (reads.size() == 2)
"""
flexi_splitter ${params.split} -n 2 -f ${reads[0]},${reads[1]} -o split -c ${config}
rm -Rf split/unassigned
mkdir -p results/
find split -type "f" | \
sed -E "s|(.*/split/(.*)/(.*))|\\1 \\2_\\3|g" |
awk '{system("mv "\$1" results/"\$2)}'
"""
else
"""
flexi_splitter ${params.split} -n 1 -f ${reads[0]} -o split -c ${config}
rm -Rf split/unassigned
mkdir -p results/
find split -type "f" | \
sed -E "s|(.*/split/(.*)/(.*))|\\1 \\2_\\3|g" |
awk '{system("mv "\$1" results/"\$2)}'
"""
}
process group_fastq {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_prefix"
if (params.split_out != "") {
publishDir "results/${params.split_out}", mode: 'copy'
}
input:
tuple val(file_id), path(reads_folder)
output:
tuple val(file_id), path("results/*"), emit: fastq
script:
"""
mkdir -p results/
find split/ -type "f" | \
grep -v "unassigned" | \
sed -E "s|(split/(.*)/(.*))|\\1 \\2_\\3|g" |
awk '{system("mv "\$1" results/"\$2)}'
"""
}
\ No newline at end of file
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