Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kmer diff
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
LBMC
Delattre
kmer diff
Commits
4c5c8034
Verified
Commit
4c5c8034
authored
1 year ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
add line number check for subsample and split
parent
8fd09836
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+7
-0
7 additions, 0 deletions
.gitignore
src/modules/sample_reads.nf
+10
-2
10 additions, 2 deletions
src/modules/sample_reads.nf
src/modules/split.nf
+3
-0
3 additions, 0 deletions
src/modules/split.nf
with
20 additions
and
2 deletions
.gitignore
+
7
−
0
View file @
4c5c8034
...
...
@@ -9,3 +9,10 @@ src/mergekmer
.Rhistory
.Rprofile
.kmer-diff.Rproj
.Rbuildignore
doc/2023_09_18_presentation.html
doc/2023_09_18_presentation_files/
doc/presentation_files/
fail.txt
kmer-diff.Rproj
src/plot_counts.Rmd
This diff is collapsed.
Click to expand it.
src/modules/sample_reads.nf
+
10
−
2
View file @
4c5c8034
...
...
@@ -120,10 +120,18 @@ process SAMPLE_READS {
error "SEQTK/SAMPLE must have a sample_size value included"
}
"""
if [\$(cat $sample_size | tr -d '\\n') -eq \$(cat $read_number | tr -d '\\n')]; then
SAMPLE_SIZE=\$((cat $sample_size | tr -d '\\n'))
CURRENT_READ_NUMBER=\$((cat $read_number | tr -d '\\n'))
if [\$SAMPLE_SIZE -eq \$CURRENT_READ_NUMBER]; then
ln -s ${reads} sample_${reads}
READ_NUMBER=\$((cat $sample_size | tr -d '\\n'))
else
zcat ${reads} | head -n \$(cat $sample_size | tr -d '\\n') | gzip -c > sample_${reads}
zcat ${reads} | head -n \$((cat $sample_size | tr -d '\\n')) | gzip -c > sample_${reads}
READ_NUMBER=\$((zcat sample_${reads} | wc -l))
fi
if [\$SAMPLE_SIZE -ne \$READ_NUMBER]; then
exit 1
fi
cat <<-END_VERSIONS > versions.yml
...
...
This diff is collapsed.
Click to expand it.
src/modules/split.nf
+
3
−
0
View file @
4c5c8034
...
...
@@ -16,6 +16,9 @@ process SPLIT {
"""
zcat ${fastq} | split -l 4000000 - ${fastq.simpleName}_
ls -l ${fastq.simpleName}_* | \\
awk '{system("if [\$((wc -l "\$9")) -ne 4000000]; then exit 1; fi")}'
ls -l ${fastq.simpleName}_* | \\
awk '{system("gzip -c "\$9" > "\$9".fastq.gz && rm "\$9)}'
...
...
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