Updates based on practice run.
authorPeter Amstutz <peter.amstutz@curii.com>
Tue, 16 Feb 2021 23:40:26 +0000 (18:40 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Tue, 16 Feb 2021 23:40:26 +0000 (18:40 -0500)
_episodes/02-workflow.md
_episodes/03-running.md
setup.md

index 6e584e6b3fb68b36bef3752395ef0b5224eab7e9..62b94466d8d56b371daeefd79448d63f0d86569e 100644 (file)
@@ -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.
index 3dc317641a22b104dfa15ed98ef2c8a0560d0193..0cf63605d3c3d2d7927918b6855d5446fe45ebd6 100644 (file)
@@ -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 }
 
index 882d4f9807cfc5f3380253bc50c69cf237c1f925..6ae114a366ad612af28817f3cd3d0df242360681 100644 (file)
--- 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
 ```