Skip to content

Commit

Permalink
workspace configs
Browse files Browse the repository at this point in the history
  • Loading branch information
5im1z committed Jan 9, 2024
1 parent af6da5e commit 846db64
Show file tree
Hide file tree
Showing 114 changed files with 15,893 additions and 0 deletions.
15 changes: 15 additions & 0 deletions data/23Q4/RNAconfig/Aggregate_Fusion_Calls/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"inputs": {
"aggregate_set_files_workflow.aggregate_set_files.aggregate_files_script": "workspace.aggregate_fusions_script",
"aggregate_set_files_workflow.aggregate_set_files.disk_space": "250",
"aggregate_set_files_workflow.aggregate_set_files.memory": "3",
"aggregate_set_files_workflow.aggregate_set_files.num_preempt": "5",
"aggregate_set_files_workflow.aggregate_set_files.output_file_name": "\"Fusions.aggregated.tsv\"",
"aggregate_set_files_workflow.aggregate_set_files.sample_files": "this.samples.fusion_predictions_abridged"
},
"outputs": {
"aggregate_set_files_workflow.aggregate_set_files.output_merged_file": "this.fusions_star"
},
"prerequisites": {},
"rootEntityType": "sample_set"
}
34 changes: 34 additions & 0 deletions data/23Q4/RNAconfig/Aggregate_Fusion_Calls/method.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Given a set of samples, combine segment files into a single file
workflow aggregate_set_files_workflow {
call aggregate_set_files
}

task aggregate_set_files {
Array[File] sample_files
String output_file_name
File aggregate_files_script

Int memory
Int disk_space
Int num_preempt


command {
Rscript ${aggregate_files_script} "${output_file_name}" ${write_lines(sample_files)}
}

output {
File output_merged_file="${output_file_name}"
}

runtime {
docker: "flyingrobin/cds_shiny"
memory: "${memory}GB"
disks: "local-disk ${disk_space} HDD"
preemptible: "${num_preempt}"
}

meta {
author: "Guillaume Kugener"
}
}
15 changes: 15 additions & 0 deletions data/23Q4/RNAconfig/ExonUsage_hg38_fixed/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"inputs": {
"ExonUsage_workflow.ExonUsage.exon_usage_script": "workspace.exon_usage_script",
"ExonUsage_workflow.ExonUsage.exonsFN": "\"gs://fc-ca01b420-53e8-4922-b152-8d5e9bdcc07f/references/exons_gencodev26_GRCh38.RData\"",
"ExonUsage_workflow.ExonUsage.juncReadFN": "this.star_junctions",
"ExonUsage_workflow.ExonUsage.minCov": "10",
"ExonUsage_workflow.ExonUsage.sample_id": "this.name"
},
"outputs": {
"ExonUsage_workflow.ExonUsage.outFN": "this.exon_usage_hg38_outFN",
"ExonUsage_workflow.ExonUsage.outRobjFN": "this.exon_usage_hg38_outRobjFN"
},
"prerequisites": {},
"rootEntityType": "sample"
}
31 changes: 31 additions & 0 deletions data/23Q4/RNAconfig/ExonUsage_hg38_fixed/method.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
task ExonUsage {
String sample_id
File exon_usage_script
File juncReadFN
File exonsFN
Int minCov

command {
set -euo pipefail

touch ${sample_id}_outputFN.txt
touch ${sample_id}_outputFN.RData
Rscript ${exon_usage_script} ${juncReadFN} ${exonsFN} ${sample_id}_outputFN.txt ${sample_id}_outputFN.RData ${minCov}
}

output {
File outFN = "${sample_id}_outputFN.txt"
File outRobjFN = "${sample_id}_outputFN.RData"
}

runtime {
docker: "mghandi/ccle_docker_r"
memory: "10GB"
disks: "local-disk 50 HDD"
preemptible: "5"
}
}

workflow ExonUsage_workflow {
call ExonUsage
}
80 changes: 80 additions & 0 deletions data/23Q4/RNAconfig/RNA_pipeline/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"inputs": {
"RNA_pipeline.StarFusion.disk_space": "500",
"RNA_pipeline.StarFusion.docker": "\"trinityctat/starfusion:1.7.0\"",
"RNA_pipeline.StarFusion.memory": "64",
"RNA_pipeline.StarFusion.num_preempt": "2",
"RNA_pipeline.StarFusion.num_threads": "8",
"RNA_pipeline.ctat_genome_lib_build_dir_files": "workspace.hg38_star_fusion_ctat_files_v33",
"RNA_pipeline.genes_gtf": "workspace.genes_gtf",
"RNA_pipeline.input_bam_cram": "this.hg19_bam_filepath",
"RNA_pipeline.ref_genome_fa_star_idx_files": "workspace.hg38_star_fusion_ctat_star_index_files_v33",
"RNA_pipeline.reference_fasta": "workspace.ref_fasta",
"RNA_pipeline.rnaseqc2.disk_space": "75",
"RNA_pipeline.rnaseqc2.memory": "8",
"RNA_pipeline.rnaseqc2.num_preempt": "1",
"RNA_pipeline.rnaseqc2.num_threads": "4",
"RNA_pipeline.rsem.disk_space": "500",
"RNA_pipeline.rsem.estimate_rspd": "\"true\"",
"RNA_pipeline.rsem.max_frag_len": "1000",
"RNA_pipeline.rsem.memory": "128",
"RNA_pipeline.rsem.num_preempt": "1",
"RNA_pipeline.rsem.num_threads": "32",
"RNA_pipeline.rsem_reference": "\"gs://ccleparams/rsem_reference_hg38_gencode_38_noALT_noHLA_noDecoy_ERCC.tar.gz\"",
"RNA_pipeline.sample_id": "this.name",
"RNA_pipeline.samtofastq.disk_space": "400",
"RNA_pipeline.samtofastq.memory": "64",
"RNA_pipeline.samtofastq.num_preempt": "5",
"RNA_pipeline.samtofastq.num_threads": "8",
"RNA_pipeline.star.alignIntronMax": "1000000",
"RNA_pipeline.star.alignIntronMin": "20",
"RNA_pipeline.star.alignMatesGapMax": "1000000",
"RNA_pipeline.star.alignSJDBoverhangMin": "1",
"RNA_pipeline.star.alignSJoverhangMin": "8",
"RNA_pipeline.star.alignSoftClipAtReferenceEnds": "\"Yes\"",
"RNA_pipeline.star.chimJunctionOverhangMin": "15",
"RNA_pipeline.star.chimMainSegmentMultNmax": "1",
"RNA_pipeline.star.chimOutJunctionFormat": "1",
"RNA_pipeline.star.chimOutType": "\"Junctions WithinBAM SoftClip\"",
"RNA_pipeline.star.chimSegmentMin": "15",
"RNA_pipeline.star.disk_space": "500",
"RNA_pipeline.star.limitSjdbInsertNsj": "1200000",
"RNA_pipeline.star.memory": "64",
"RNA_pipeline.star.num_preempt": "1",
"RNA_pipeline.star.num_threads": "16",
"RNA_pipeline.star.outFilterIntronMotifs": "\"None\"",
"RNA_pipeline.star.outFilterMatchNminOverLread": "0.33",
"RNA_pipeline.star.outFilterMismatchNmax": "999",
"RNA_pipeline.star.outFilterMismatchNoverLmax": "0.1",
"RNA_pipeline.star.outFilterMultimapNmax": "20",
"RNA_pipeline.star.outFilterScoreMinOverLread": "0.33",
"RNA_pipeline.star.outFilterType": "\"BySJout\"",
"RNA_pipeline.star.outSAMattrRGline": "\"ID:rg1 SM:sm1\"",
"RNA_pipeline.star.outSAMattributes": "\"NH HI AS nM NM ch\"",
"RNA_pipeline.star.outSAMstrandField": "\"intronMotif\"",
"RNA_pipeline.star.quantMode": "\"TranscriptomeSAM GeneCounts\"",
"RNA_pipeline.star_index": "\"gs://ccleparams/star_index_hg38_noALT_noHLA_noDecoy_ERCC.tar.gz\""
},
"outputs": {
"RNA_pipeline.bam_file": "this.internal_bam_filepath",
"RNA_pipeline.bam_index": "this.internal_bai_filepath",
"RNA_pipeline.chimeric_bam_file": "this.star_chimeric_bam_file",
"RNA_pipeline.chimeric_junctions": "this.star_chimeric_junctions",
"RNA_pipeline.exon_counts": "this.rnaseqc2_exon_counts",
"RNA_pipeline.fusion_predictions": "this.fusion_predictions",
"RNA_pipeline.fusion_predictions_abridged": "this.fusion_predictions_abridged",
"RNA_pipeline.gene_counts": "this.rnaseqc2_gene_counts",
"RNA_pipeline.gene_tpm": "this.rnaseqc2_gene_tpm",
"RNA_pipeline.genes": "this.rsem_genes",
"RNA_pipeline.insertsize_distr": "this.rnaseqc2_insertsize_distr",
"RNA_pipeline.isoforms": "this.rsem_isoforms",
"RNA_pipeline.junctions": "this.star_junctions",
"RNA_pipeline.junctions_pass1": "this.star_junctions_pass1",
"RNA_pipeline.logs": "this.star_logs",
"RNA_pipeline.metrics": "this.rnaseqc2_metrics",
"RNA_pipeline.read_counts": "this.star_read_counts",
"RNA_pipeline.transcriptome_bam": "this.star_transcriptome_bam"
},
"prerequisites": {},
"rootEntityType": "sample"
}
81 changes: 81 additions & 0 deletions data/23Q4/RNAconfig/RNA_pipeline/hg38_STAR_fusion_wdl1-0.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
version 1.0

task StarFusion {

input {
File left_fastq
File right_fastq
Array[File] ctat_genome_lib_build_dir_files
Array[File] ref_genome_fa_star_idx_files

String prefix

Int memory=64
Int disk_space=500
Int num_threads=8
Int num_preempt=2
String docker="trinityctat/starfusion:1.7.0"
}

command {
# We need to recreate the directory structure for STAR-Fusion
mkdir ctat_genome_lib_build_dir
for path in "${sep='" "' ctat_genome_lib_build_dir_files}"; do
mv $path ctat_genome_lib_build_dir
done
mkdir ctat_genome_lib_build_dir/ref_genome.fa.star.idx
for path in "${sep='" "' ref_genome_fa_star_idx_files}"; do
mv $path ctat_genome_lib_build_dir/ref_genome.fa.star.idx
done

ls ctat_genome_lib_build_dir | xargs echo

# Run STAR fusion
/usr/local/src/STAR-Fusion/STAR-Fusion --genome_lib_dir ctat_genome_lib_build_dir \
--left_fq ${left_fastq} \
--right_fq ${right_fastq} \
--min_FFPM 0 \
--no_annotation_filter \
--output_dir star_fusion_outdir

cp star_fusion_outdir/star-fusion.fusion_predictions.abridged.tsv "${prefix}.star-fusion.fusion_predictions.abridged.tsv"
cp star_fusion_outdir/star-fusion.fusion_predictions.tsv "${prefix}.star-fusion.fusion_predictions.tsv"
}

output {
File fusion_predictions = "${prefix}.star-fusion.fusion_predictions.tsv"
File fusion_predictions_abridged = "${prefix}.star-fusion.fusion_predictions.abridged.tsv"
}

runtime {
docker: "${docker}"
memory: "${memory}GB"
disks: "local-disk ${disk_space} HDD"
cpu: "${num_threads}"
preemptible: "${num_preempt}"
}
}

#FusionFilter is what was used to generate the reference used in this pipeline.
workflow trinity_cleaned {

input {
String prefix
File fastq1
File fastq2
Array[File] ctat_genome_lib_build_dir_files
Array[File] ref_genome_fa_star_idx_files
}
call StarFusion {
input:
prefix = prefix,
left_fastq=fastq1,
right_fastq=fastq2,
ctat_genome_lib_build_dir_files=ctat_genome_lib_build_dir_files,
ref_genome_fa_star_idx_files=ref_genome_fa_star_idx_files
}
output {
File fusion_predictions = StarFusion.fusion_predictions
File fusion_predictions_abridged = StarFusion.fusion_predictions_abridged
}
}
Loading

0 comments on commit 846db64

Please sign in to comment.