Skip to content

Commit

Permalink
Rename output file (#58)
Browse files Browse the repository at this point in the history
* Rename output file

* Add output rename in workflow

* Update Cicero.sh
  • Loading branch information
adthrasher authored Apr 28, 2021
1 parent 920cd51 commit f3a022c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 5 additions & 2 deletions cgc/cicero.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,15 @@ outputs:
type: File?
outputBinding:
glob: >-
$(inputs.bam_file.nameroot)/CICERO_DATADIR/$(inputs.bam_file.nameroot)/final_fusions.txt
$(inputs.bam_file.nameroot)/CICERO_DATADIR/$(inputs.bam_file.nameroot)/$(inputs.bam_file.nameroot).final_fusions.txt
label: cicero
arguments:
- position: 101
prefix: '-o'
valueFrom: (inputs.bam_file.nameroot)
valueFrom: $(inputs.bam_file.nameroot)
- position: 102
prefix: '-f'
valueFrom: $(inputs.bam_file.nameroot).final_fusions.txt
requirements:
- class: ShellCommandRequirement
- class: InlineJavascriptRequirement
Expand Down
8 changes: 7 additions & 1 deletion cgc/rnapeg_cicero.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"id": "output_file",
"type": "File",
"outputBinding": {
"glob": "$(inputs.bam_file.nameroot)/CICERO_DATADIR/$(inputs.bam_file.nameroot)/final_fusions.txt"
"glob": "$(inputs.bam_file.nameroot)/CICERO_DATADIR/$(inputs.bam_file.nameroot)/$(inputs.bam_file.nameroot).final_fusions.txt"
}
}
],
Expand All @@ -242,6 +242,12 @@
"shellQuote": false,
"position": 101,
"valueFrom": "$(inputs.bam_file.nameroot)"
},
{
"prefix": "-f",
"shellQuote": false,
"position": 102,
"valueFrom": "$(inputs.bam_file.nameroot).final_fusions.txt"
}
],
"requirements": [
Expand Down
4 changes: 3 additions & 1 deletion src/scripts/Cicero.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ echo "Step 05 - $(date +'%Y.%m.%d %H:%M:%S') - Filter"
{
cicero_filter.sh $CICERO_DATADIR $SAMPLE $GENOME
cp $CICERO_DATADIR/$SAMPLE/final_fusions.txt $CICERO_DATADIR/$SAMPLE/final_fusions.report.html
cp $CICERO_DATADIR/$SAMPLE/final_fusions.txt $CICERO_DATADIR/$SAMPLE/${SAMPLE}.final_fusions.txt
} 1> 05_Filter.out 2> 05_Filter.err

## QC
Expand All @@ -364,7 +365,8 @@ fi
### STEP 06 - Rename output ###
###############################
if [[ -n $FILENAME ]]; then
mv $OUTDIR/$CICERO_DATADIR/$SAMPLE/final_fusions.txt $OUTDIR/$CICERO_DATADIR/$SAMPLE/$FILENAME
echo "Renaming output file: $CICERO_DATADIR/$SAMPLE/final_fusions.txt $CICERO_DATADIR/$SAMPLE/$FILENAME" 2>&1
cp $CICERO_DATADIR/$SAMPLE/final_fusions.txt $CICERO_DATADIR/$SAMPLE/$FILENAME
fi

############################
Expand Down

0 comments on commit f3a022c

Please sign in to comment.