I am trying to use STAR for multiple steps in a workflow. The first step creates STAR indices and outputs 15 files to the working directory. The next step is the alignment and one of the arguments that it expects is the path to the directory that contains the files in the previous step. How can I indicate the output directory of the previous step as an input? Here's some of the 'steps' section:
steps:
prepStar:
run: lrnaStarIndex1_Star.cwl
in:
refGenomeFastaFile: refGenomeFasta
spikeInFasta: spikeIn
sjdbGtfFile: GTF_file
#Bunch of stuff is set as defaults.
out: [exonGeTrInfo, exonInfo, SA, SAindex, transcriptInfo, chrLength, chrNameLength, chrName, chrStart, geneInfo, Genome, genomeParameters, sjdbInfo, sjdbListFromGtfOut, sjdbListOut]
starAlign:
run: lrnaAlignStarPe1_STAR.cwl
in:
genomeDir: #NEED HELP HERE!!! Specify the directory that contains files from prepStar step and force prepStar step to run first.
readFilesIn: fastqExperimentFile1
readFilesIn2: fastqExperimentFile2
#Bunch of stuff is set as defaults.
out: [logFinal, log, logProgress, SJout, alignedSortedByCoordOut, alignedToTranscriptomeOut]
I've played around with the In lineJavascriptRequirement and InitialWorkDirRequirement without success. Seem like referring to the prepStar step in the requirements section does not force step order and the starAlign step tries to run first.
Thanks. I'll give it a try.
Finally got around to working on this again and got it to work with option 3) since I didn't want to change the inputs to either tool. Can only get it to work though if outputBinding is { glob: . } as suggested.