Skip to content

Commit

Permalink
Merge pull request #12 from nf-core/alignment_phase
Browse files Browse the repository at this point in the history
Add alignment via STAR + postprocessing
  • Loading branch information
pinin4fjords authored Feb 19, 2024
2 parents ca556ad + 74fc9f3 commit d14a8d9
Show file tree
Hide file tree
Showing 79 changed files with 5,431 additions and 31 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[#8](https://github.com/nf-core/riboseq/pull/8) - Preprocessing from rnaseq ([@pinin4fjords](https://github.com/pinin4fjords), review by [@maxulysse](https://github.com/maxulysse) review by [@adamrtalbot](https://github.com/adamrtalbot))
- [[#10](https://github.com/nf-core/riboseq/pull/10)] - Take preprocessing from nf-core ([@pinin4fjords](https://github.com/pinin4fjords), review by [@adamrtalbot](https://github.com/adamrtalbot))
- [[#9](https://github.com/nf-core/riboseq/pull/9)] - Important! Template update for nf-core/tools v2.12 ([nf-core-bot](https://github.com/nf-core-bot), review by [@pinin4fjords](https://github.com/pinin4fjords))
- [[#12](https://github.com/nf-core/riboseq/pull/12) - Add alignment via STAR + postprocessing (([@pinin4fjords](https://github.com/pinin4fjords), review by )

Initial release of nf-core/riboseq, created with the [nf-core](https://nf-co.re/) template.

Expand Down
35 changes: 18 additions & 17 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ if (params.remove_ribo_rna) {

if (!params.skip_alignment) {
process {
withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' {
ext.prefix = { "${meta.id}.sorted.bam" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/samtools_stats" },
Expand All @@ -357,7 +357,7 @@ if (!params.skip_alignment) {
]
}

withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' {
ext.prefix = { "${meta.id}.sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}" },
Expand All @@ -369,7 +369,7 @@ if (!params.skip_alignment) {
]
}

withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' {
ext.args = { params.bam_csi_index ? '-c' : '' }
publishDir = [
path: { "${params.outdir}/${params.aligner}" },
Expand Down Expand Up @@ -534,19 +534,20 @@ if (!params.skip_alignment) {

if (!params.skip_alignment && params.aligner == 'star_salmon') {
process {
withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' {
withName: 'STAR_ALIGN' {
ext.args = { [
'--quantMode TranscriptomeSAM',
'--twopassMode Basic',
'--alignSJDBoverhangMin 1',
'--alignEndsType EndToEnd',
'--outFilterMultimapNmax 20',
params.save_unaligned ? '--outReadsUnmapped Fastx' : '',
'--outSAMattributes All',
'--outSAMstrandField intronMotif',
'--outSAMtype BAM Unsorted',
'--quantMode TranscriptomeSAM',
'--quantTranscriptomeBan Singleend',
'--readFilesCommand zcat',
'--runRNGseed 0',
'--outFilterMultimapNmax 20',
'--alignSJDBoverhangMin 1',
'--outSAMattributes NH HI AS NM MD',
'--quantTranscriptomeBan Singleend',
'--outSAMstrandField intronMotif',
params.save_unaligned ? '--outReadsUnmapped Fastx' : '',
'--twopassMode Basic',
params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : ''
].flatten().unique(false).join(' ').trim() }
publishDir = [
Expand Down Expand Up @@ -607,7 +608,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') {

if (params.with_umi) {
process {
withName: 'NFCORE_RNASEQ:RNASEQ:SAMTOOLS_SORT' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:SAMTOOLS_SORT' {
ext.args = '-n'
ext.prefix = { "${meta.id}.umi_dedup.transcriptome" }
publishDir = [
Expand All @@ -618,7 +619,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') {
]
}

withName: 'NFCORE_RNASEQ:RNASEQ:UMITOOLS_PREPAREFORSALMON' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:UMITOOLS_PREPAREFORSALMON' {
ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" }
publishDir = [
[
Expand All @@ -635,7 +636,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') {
]
}

withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' {
ext.prefix = { "${meta.id}.transcriptome.sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}" },
Expand All @@ -645,7 +646,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') {
]
}

withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' {
publishDir = [
path: { "${params.outdir}/${params.aligner}" },
mode: params.publish_dir_mode,
Expand All @@ -654,7 +655,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') {
]
}

withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' {
withName: 'NFCORE_RIBOSEQ:RIBOSEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' {
ext.prefix = { "${meta.id}.transcriptome.sorted.bam" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/samtools_stats" },
Expand Down
4 changes: 2 additions & 2 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ params {

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_memory = '12.GB'
max_time = '6.h'

// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/riboseq/testdata/samplesheet.csv'

fasta = 'http://ftp.ensembl.org/pub/release-110/fasta/mus_musculus/dna/Mus_musculus.GRCm39.dna.chromosome.1.fa.gz'
fasta = 'http://ftp.ensembl.org/pub/release-110/fasta/mus_musculus/dna/Mus_musculus.GRCm39.dna.chromosome.19.fa.gz'
gtf = 'http://ftp.ensembl.org/pub/release-110/gtf/mus_musculus/Mus_musculus.GRCm39.110.gtf.gz'
min_trimmed_reads = 1000
}
13 changes: 6 additions & 7 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running full-size tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a full size pipeline test.
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/riboseq -profile test_full,<docker/singularity> --outdir <OUTDIR>
Expand All @@ -14,11 +14,10 @@ params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'

// Input data for full size test
// TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
// TODO nf-core: Give any required params for the test so that command line flags are not needed
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv'
// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/riboseq/testdata/samplesheet.csv'

// Genome references
genome = 'R64-1-1'
fasta = 'http://ftp.ensembl.org/pub/release-110/fasta/mus_musculus/dna/Mus_musculus.GRCm39.dna.primary_assembly.fa.gz'
gtf = 'http://ftp.ensembl.org/pub/release-110/gtf/mus_musculus/Mus_musculus.GRCm39.110.gtf.gz'
min_trimmed_reads = 1000
}
60 changes: 60 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,41 @@
"git_sha": "003920c7f9a8ae19b69a97171922880220bedf56",
"installed_by": ["fastq_subsample_fq_salmon"]
},
"samtools/flagstat": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_stats_samtools"]
},
"samtools/idxstats": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_stats_samtools"]
},
"samtools/index": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_dedup_stats_samtools_umitools", "bam_sort_stats_samtools"]
},
"samtools/sort": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_sort_stats_samtools"]
},
"samtools/stats": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_stats_samtools"]
},
"sortmerna": {
"branch": "master",
"git_sha": "003920c7f9a8ae19b69a97171922880220bedf56",
"installed_by": ["preprocess_rnaseq"]
},
"star/align": {
"branch": "master",
"git_sha": "a21faa6a3481af92a343a10926f59c189a2c16c9",
"installed_by": ["fastq_align_star", "modules"]
},
"star/genomegenerate": {
"branch": "master",
"git_sha": "003920c7f9a8ae19b69a97171922880220bedf56",
Expand All @@ -105,11 +135,21 @@
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["fastq_fastqc_umitools_trimgalore"]
},
"umitools/dedup": {
"branch": "master",
"git_sha": "ff7e93715a2acecf3f143ec78c9858deba2984d0",
"installed_by": ["bam_dedup_stats_samtools_umitools"]
},
"umitools/extract": {
"branch": "master",
"git_sha": "65ad3e0b9a4099592e1102e92e10455dc661cf53",
"installed_by": ["fastq_fastqc_umitools_fastp", "fastq_fastqc_umitools_trimgalore"]
},
"umitools/prepareforrsem": {
"branch": "master",
"git_sha": "ff7e93715a2acecf3f143ec78c9858deba2984d0",
"installed_by": ["modules"]
},
"untar": {
"branch": "master",
"git_sha": "e719354ba77df0a1bd310836aa2039b45c29d620",
Expand All @@ -119,6 +159,26 @@
},
"subworkflows": {
"nf-core": {
"bam_dedup_stats_samtools_umitools": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["subworkflows"]
},
"bam_sort_stats_samtools": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["fastq_align_star", "subworkflows"]
},
"bam_stats_samtools": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_dedup_stats_samtools_umitools", "bam_sort_stats_samtools"]
},
"fastq_align_star": {
"branch": "master",
"git_sha": "4cef5bd781be21ecb80de664d1a8c5eba980f304",
"installed_by": ["subworkflows"]
},
"fastq_fastqc_umitools_fastp": {
"branch": "master",
"git_sha": "003920c7f9a8ae19b69a97171922880220bedf56",
Expand Down
8 changes: 8 additions & 0 deletions modules/nf-core/samtools/flagstat/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions modules/nf-core/samtools/flagstat/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions modules/nf-core/samtools/flagstat/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions modules/nf-core/samtools/flagstat/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d14a8d9

Please sign in to comment.