Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nextflow
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
Model registry
Operate
Environments
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
nextflow
Commits
6231fc3f
Verified
Commit
6231fc3f
authored
3 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
alntools: separate transcript length computation
parent
c355cfa8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nf_modules/alntools/main.nf
+25
-4
25 additions, 4 deletions
src/nf_modules/alntools/main.nf
src/nf_modules/bioawk/main.nf
+24
-0
24 additions, 0 deletions
src/nf_modules/bioawk/main.nf
with
49 additions
and
4 deletions
src/nf_modules/alntools/main.nf
+
25
−
4
View file @
6231fc3f
...
...
@@ -13,16 +13,38 @@ process bam2ec {
input:
tuple val(file_id), path(bam), path(bam_idx)
tuple val(
gtf_id), path(gtf
)
tuple val(
transcripts_lengths_id), path(transcripts_lengths
)
output:
tuple val(file_id), path("${bam.simpleName}.bin"), emit: bin
tuple val(gtf_id), path("${
gtf.simpleName}_
transcripts_lengths
.tsv
"), emit: tsv
tuple val(gtf_id), path("${transcripts_lengths
}
"), emit: tsv
script:
"""
cp ${bam} file_bam.bam
cp ${bam_idx} file_bam.bam.bai
alntools bam2ec ${params.bam2ec} -t ${transcripts_lengths} file_bam.bam ${bam.simpleName}.bin
"""
}
params.gtf_to_transcripts_lengths = ""
params.gtf_to_transcripts_lengths_out = ""
process gtf_to_transcripts_lengths {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.gtf_to_transcripts_lengths != "") {
publishDir "results/${params.gtf_to_transcripts_lengths}", mode: 'copy'
}
input:
tuple val(file_id), path(gtf)
output:
tuple val(file_id), path("${gtf.simpleName}_transcripts_lengths.tsv"), emit: tsv
script:
"""
awk -F"[\\t;]" '
\$3=="exon" {
ID=gensub(/transcript_id \\"(.*)\\"/, "\\\\1", "g", \$11);
...
...
@@ -33,6 +55,5 @@ END{
{print i"\\t"LEN[i]}
}
' ${gtf} > ${gtf.simpleName}_transcripts_lengths.tsv
alntools bam2ec ${params.bam2ec} -t ${gtf.simpleName}_transcripts_lengths.tsv file_bam.bam ${bam.simpleName}.bin
"""
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
src/nf_modules/bioawk/main.nf
0 → 100644
+
24
−
0
View file @
6231fc3f
version = "1.0"
container_url = "lbmc/bioawk:${version}"
params.fasta_to_transcripts_lengths = ""
params.fasta_to_transcripts_lengths_out = ""
process fasta_to_transcripts_lengths {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.fasta_to_transcripts_lengths_out != "") {
publishDir "results/${params.fasta_to_transcripts_lengths_out}", mode: 'copy'
}
input:
tuple val(file_id), path(fasta)
output:
tuple val(file_id), path("${fasta.simpleName}_transcripts_lengths.tsv"), emit: tsv
script:
"""
bioawk -c fastx '{print \$name length(\$seq)}' ${fasta} > ${fasta.simpleName}_transcripts_lengths.tsv
"""
}
\ 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