From e62676cf816dccdf33a2ecd73dc678a9a39a3837 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 16 Feb 2021 18:40:26 -0500 Subject: [PATCH] Updates based on practice run. --- _episodes/02-workflow.md | 96 ++++++++++++++++++++++++---------------- _episodes/03-running.md | 2 +- setup.md | 4 ++ 3 files changed, 64 insertions(+), 38 deletions(-) diff --git a/_episodes/02-workflow.md b/_episodes/02-workflow.md index 6e584e6..62b9446 100644 --- a/_episodes/02-workflow.md +++ b/_episodes/02-workflow.md @@ -64,7 +64,7 @@ echo "Processing file $fq" fastqc $fq # Run STAR -STAR --runThreadN $cores --genomeDir $genome --readFilesIn $fq --outFileNamePrefix $align_out --outSAMtype BAM SortedByCoordinate --outSAMunmapped Within --outSAMattributes Standard +STAR --runThreadN $cores --genomeDir $genome --readFilesIn $fq --outSAMtype BAM SortedByCoordinate --outSAMunmapped Within # Create BAM index samtools index $counts_input_bam @@ -302,7 +302,7 @@ The next step is to run the STAR aligner. ``` # Run STAR -STAR --runThreadN $cores --genomeDir $genome --readFilesIn $fq --outFileNamePrefix $align_out --outSAMtype BAM SortedByCoordinate --outSAMunmapped Within --outSAMattributes Standard +STAR --runThreadN $cores --genomeDir $genome --readFilesIn $fq --outSAMtype BAM SortedByCoordinate --outSAMunmapped Within ``` {: .language-bash } @@ -310,55 +310,77 @@ We will go through the same process as the first section. We find there is `bio-cwl-tools/STAR/STAR-Align.cwl`. We will open the file and look at the `inputs` section to determine what input parameters correspond to the command line parmeters from our source script. -Command line flags generally appear appear in either the `arguments` -field, or the `prefix` field of the `inputBinding` section of an input -parameter declaration. For example, this tells us that the -`GenomeDir` input parameter corresponds to the `--genomeDir` command -line parameter. -``` - GenomeDir: - type: Directory - inputBinding: - prefix: "--genomeDir" -``` -{: .language-yaml } - -Sometimes we want to provide input values to a step without making -them as workflow-level inputs. We can do this with `{default: N}`. -For example: +> ## Exercise +> +> Look at `STAR-Align.cwl` and identify the input parameters that +> correspond to the command line arguments used in the source script: +> `--runThreadN`, `--genomeDir`, `--outSAMtype`, and +> `--outSAMunmapped`. Also identify the name of the output parameter. +> Use these to write the STAR step. +> +> > ## Solution +> > +> > input parameter name: RunThreadN, GenomeDir, ForwardReads, OutSAMtype, SortedByCoordinate, OutSAMunmapped +> > +> > output parameter name: alignment +> {: .solution} +{: .challenge} -``` - in: - RunThreadN: {default: 4} -``` -{: .language-yaml } +> ## Command line flags +> +> Command line flags generally appear appear in either the `arguments` +> field, or the `prefix` field of the `inputBinding` section of an +> input parameter declaration. For example, this section of +> `STAR-Align.cwl` tells us that the `GenomeDir` input parameter +> corresponds to the `--genomeDir` command line parameter. +> +> ``` +> GenomeDir: +> type: Directory +> inputBinding: +> prefix: "--genomeDir" +> ``` +> {: .language-yaml } +{: .callout} + +> ## Default values +> +> Sometimes we want to provide input values to a step without making +> them as workflow-level inputs. We can do this with `{default: N}`. +> For example: +> +> ``` +> in: +> RunThreadN: {default: 4} +> ``` +> {: .language-yaml } +{: .callout} > ## Exercise > -> Look at `STAR-Align.cwl` and identify the other input parameters that -> correspond to the command line arguments used in the source script. -> Also identify the output parameter. Use these to write the STAR -> step. +> Using the input and output parameters identified in the last +> exercise, write the `run`, `in` and `out` sections of the STAR step. > > > ## Solution > > > > ``` -> > STAR: -> > run: bio-cwl-tools/STAR/STAR-Align.cwl -> > in: -> > RunThreadN: {default: 4} -> > GenomeDir: genome -> > ForwardReads: fq -> > OutSAMtype: {default: BAM} -> > SortedByCoordinate: {default: true} -> > OutSAMunmapped: {default: Within} -> > out: [alignment] +> > STAR: +> > run: bio-cwl-tools/STAR/STAR-Align.cwl +> > in: +> > RunThreadN: {default: 4} +> > GenomeDir: genome +> > ForwardReads: fq +> > OutSAMtype: {default: BAM} +> > SortedByCoordinate: {default: true} +> > OutSAMunmapped: {default: Within} +> > out: [alignment] > > ``` > > {: .language-yaml } > {: .solution} {: .challenge} + # Running samtools The third step is to generate an index for the aligned BAM. diff --git a/_episodes/03-running.md b/_episodes/03-running.md index 3dc3176..0cf6360 100644 --- a/_episodes/03-running.md +++ b/_episodes/03-running.md @@ -78,7 +78,7 @@ genome: location: keep:02a12ce9e2707610991bd29d38796b57+2912 gtf: class: File - location: 9178fe1b80a08a422dbe02adfd439764+925/reference_data/chr1-hg19_genes.gtf + location: keep:9178fe1b80a08a422dbe02adfd439764+925/reference_data/chr1-hg19_genes.gtf ``` {: .language-yaml } diff --git a/setup.md b/setup.md index 882d4f9..6ae114a 100644 --- a/setup.md +++ b/setup.md @@ -110,6 +110,8 @@ git submodule add https://github.com/common-workflow-library/bio-cwl-tools.git > you do not need to perform this download step. {: .callout} +Use `arv-copy` to copy the collection: + ``` arv-copy --src jutro 9178fe1b80a08a422dbe02adfd439764+925 ``` @@ -130,6 +132,8 @@ This is a rather large download (4 GB). Depending on your bandwidth, it may be > if you already have access to this collection. {: .callout} +Use `arv-copy` to copy the collection: + ``` arv-copy --src jutro 02a12ce9e2707610991bd29d38796b57+2912 ``` -- 2.30.2