Skip to content

Add a proper intro to IDE features #632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
654 changes: 654 additions & 0 deletions docs/side_quests/ide_features.md

Large diffs are not rendered by default.

Binary file added docs/side_quests/img/active_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/autocomplete_channel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/autocomplete_operators.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/autocomplete_params.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/autocomplete_process.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/autocomplete_task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/code_folding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/dag_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/dag_preview_inner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/error_underline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/finding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/follow_link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/install_extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/problems_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/project_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/references.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/sai_explains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/seqeraai_errors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/split_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/symbols.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/syntax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/syntax_showcase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/side_quests/img/vscode_dropdown_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ nav:
- Side Quests:
- side_quests/index.md
- side_quests/orientation.md
- side_quests/ide_features.md
- side_quests/workflows_of_workflows.md
- side_quests/splitting_and_grouping.md
- side_quests/nf-test.md
Expand Down
29 changes: 29 additions & 0 deletions side-quests/ide_features/basic_workflow.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env nextflow

include { FASTQC } from './modules/fastqc.nf'

/*
* Workflow parameters
*/
params.input = 'data/sample_data.csv'
params.output_dir = 'results'

/*
* Main workflow demonstrating module usage and navigation
*/
workflow {
// Create input channel from CSV file
ch_input = Channel.fromPath(params.input, checkIfExists: true)
.splitCsv(header: true)
.map { row ->
return [row.sample_id, file(row.fastq_path)]
}
.view { "Processing sample: ${it[0]} -> ${it[1]}" }

// Run FastQC process - Ctrl-click on FASTQC to navigate to module
FASTQC(ch_input)

// View outputs
FASTQC.out.html.view { "FastQC report: ${it}" }
FASTQC.out.zip.view { "FastQC data: ${it}" }
}
88 changes: 88 additions & 0 deletions side-quests/ide_features/complex_workflow.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/usr/bin/env nextflow

/*
* Complex Workflow Example for IDE Navigation Training
*/

include { FASTQC } from './modules/fastqc'
include { STAR_ALIGN } from './modules/star'
include { MULTIQC } from './modules/utils'

process TRIM_GALORE {
tag "${sample_id}"
publishDir "${params.output}/trimmed", mode: 'copy'

input:
tuple val(sample_id), path(reads)

output:
tuple val(sample_id), path("${sample_id}_trimmed_*.fq.gz")

script:
"""
trim_galore --paired ${reads}
"""
}

process FEATURECOUNTS {
tag "${sample_id}"
publishDir "${params.output}/counts", mode: 'copy'

input:
tuple val(sample_id), path(bam), path(gtf)

output:
tuple val(sample_id), path("${sample_id}_counts.txt")

script:
"""
featureCounts -p -t exon -g gene_id -a ${gtf} -o ${sample_id}_counts.txt ${bam}
"""
}

workflow RNASEQ_PIPELINE {
take:
reads_ch
reference_ch
gtf_ch

main:
// Quality control
FASTQC(reads_ch)

// Trimming
TRIM_GALORE(reads_ch)

// Alignment
STAR_ALIGN(TRIM_GALORE.out, reference_ch)

// Quantification
count_input = STAR_ALIGN.out.combine(gtf_ch)
FEATURECOUNTS(count_input)

// Aggregate QC
qc_files = FASTQC.out.mix(TRIM_GALORE.out)
MULTIQC(qc_files.collect())

emit:
counts = FEATURECOUNTS.out
qc_report = MULTIQC.out
}

workflow {
// Input channels
ch_read = Channel.fromPath(params.input)
.splitCsv(header: true)
.map { row -> [row.sample_id, [file(row.fastq_1), file(row.fastq_2)]] }

ch_reference = Channel.fromPath(params.reference)
ch_gtf = Channel.fromPath(params.gtf)

// Execute pipeline
RNASEQ_PIPELINE(ch_reads, ch_reference, ch_gtf)

// Output summary
RNASEQ_PIPELINE.out.counts
.collectFile(name: 'expression_matrix.txt', sort: true)
.view { "Expression matrix created: ${it}" }
}
Binary file added side-quests/ide_features/data/sample_001.fastq.gz
Binary file not shown.
Binary file added side-quests/ide_features/data/sample_002.fastq.gz
Binary file not shown.
Binary file added side-quests/ide_features/data/sample_003.fastq.gz
Binary file not shown.
Binary file added side-quests/ide_features/data/sample_004.fastq.gz
Binary file not shown.
Binary file added side-quests/ide_features/data/sample_005.fastq.gz
Binary file not shown.
6 changes: 6 additions & 0 deletions side-quests/ide_features/data/sample_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sample_id,fastq_path
sample_001,data/sample_001.fastq.gz
sample_002,data/sample_002.fastq.gz
sample_003,data/sample_003.fastq.gz
sample_004,data/sample_004.fastq.gz
sample_005,data/sample_005.fastq.gz
26 changes: 26 additions & 0 deletions side-quests/ide_features/modules/fastqc.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
process FASTQC {
tag "${sample_id}"
publishDir "${params.output_dir}/fastqc", mode: 'copy'

// Container directive for reproducibility
container 'biocontainers/fastqc:v0.11.9_cv8'

input:
tuple val(sample_id), path(reads)

output:
tuple val(sample_id), path("*.html"), emit: html
tuple val(sample_id), path("*.zip"), emit: zip

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
"""
fastqc \\
${args} \\
--threads ${task.cpus} \\
${reads}
"""
}
32 changes: 32 additions & 0 deletions side-quests/ide_features/modules/star.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
process STAR_ALIGN {
tag "${sample_id}"
publishDir "${params.output}/alignments", mode: 'copy'
container 'biocontainers/star:2.7.10a_cv1'
cpus 8
memory '32.GB'

input:
tuple val(sample_id), path(reads)
path reference_dir

output:
tuple val(sample_id), path("${sample_id}_Aligned.sortedByCoord.out.bam")

script:
"""
STAR \\
--runThreadN ${task.cpus} \\
--genomeDir ${reference_dir} \\
--readFilesIn ${reads} \\
--readFilesCommand zcat \\
--outFileNamePrefix ${sample_id}_ \\
--outSAMtype BAM SortedByCoordinate \\
--outSAMunmapped Within \\
--outSAMattributes Standard
"""

stub:
"""
touch ${sample_id}_Aligned.sortedByCoord.out.bam
"""
}
46 changes: 46 additions & 0 deletions side-quests/ide_features/modules/utils.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
process MULTIQC {
publishDir "${params.output}/multiqc", mode: 'copy'
container 'biocontainers/multiqc:1.13_cv1'
cpus 2
memory '4.GB'

input:
path qc_files

output:
path "multiqc_report.html"
path "multiqc_data/"

script:
"""
multiqc \\
--force \\
--title "Pipeline QC Report" \\
--filename multiqc_report.html \\
.
"""

stub:
"""
mkdir multiqc_data
touch multiqc_report.html
"""
}

process CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir "${params.output}/pipeline_info", mode: 'copy'

input:
path versions

output:
path "software_versions.yml"
path "software_versions_mqc.yml"

script:
"""
cat ${versions} > software_versions.yml
echo 'id: "software_versions"' > software_versions_mqc.yml
echo 'section_name: "Software Versions"' >> software_versions_mqc.yml
"""
}
6 changes: 6 additions & 0 deletions side-quests/ide_features/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Nextflow Configuration for IDE Features Training
*/


docker.enabled = true