瀏覽代碼

first commit

master
biolcl 3 年之前
當前提交
e765f543a2
共有 5 個檔案被更改,包括 116 行新增0 行删除
  1. +0
    -0
      README.md
  2. +5
    -0
      defaults
  3. +12
    -0
      inputs
  4. +68
    -0
      tasks/lohhla.wdl
  5. +31
    -0
      workflow.wdl

+ 0
- 0
README.md 查看文件


+ 5
- 0
defaults 查看文件

@@ -0,0 +1,5 @@
{
"lohhla_docker":"registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/lohhla_hg38:v3.6.3",
"lohhla_cluster":"OnDemand bcs.ps.r.xlarge img-ubuntu-vpc",
"disk_size":"200"
}

+ 12
- 0
inputs 查看文件

@@ -0,0 +1,12 @@
{
"{{ project_name }}.sample_id": "{{ sample_id }}",
"{{ project_name }}.normBAM": "{{ normBAM }}",
"{{ project_name }}.normBAM_bai": "{{ normBAM_bai }}",
"{{ project_name }}.tumorBAM": "{{ tumorBAM }}",
"{{ project_name }}.tumorBAM_bai": "{{ tumorBAM_bai }}",
"{{ project_name }}.hlas": "{{ hlas }}",
"{{ project_name }}.ascat": "{{ ascat }}",
"{{ project_name }}.lohhla_docker": "{{ lohhla_docker }}",
"{{ project_name }}.lohhla_cluster": "{{ lohhla_cluster }}",
"{{ project_name }}.disk_size": "{{ disk_size }}"
}

+ 68
- 0
tasks/lohhla.wdl 查看文件

@@ -0,0 +1,68 @@
task lohhla {
String sample_id
File normBAM
File normBAM_bai
File tumorBAM
File tumorBAM_bai
File hlas
File ascat
String docker
String cluster
String disk_size

command <<<
set -o pipefail
set -e
now_path=`pwd`
echo $now_path > $now_path/test.txt
mkdir -p ./ana/${sample_id}/
cp ${normBAM} ./ana/${sample_id}/
cp ${normBAM_bai} ./ana/${sample_id}/
cp ${tumorBAM} ./ana/${sample_id}/
cp ${tumorBAM_bai} ./ana/${sample_id}/
cp ${hlas} ./ana/
cp ${ascat} ./ana/

for line in `ls ./ana/${sample_id}|sed 's/.bam.*//'|sort|uniq`
do
new_name=`echo $line|sed 's/\./_/g'`
mv ./ana/${sample_id}/$line.bam ./ana/${sample_id}/$new_name.bam
mv ./ana/${sample_id}/$line.bam.bai ./ana/${sample_id}/$new_name.bam.bai
done
normBAM_file=`ls ./ana/${sample_id}/|grep bam|grep -v "TT"|grep -v "bai"|grep -v "_T_sorted"`

Rscript /software/lohhla_hg38/LOHHLAscript_hg38.R --patientId ${sample_id} \
--outputDir $now_path/ana/${sample_id}_output \
--normalBAMfile $now_path/ana/${sample_id}/$normBAM_file \
--BAMDir $now_path/ana/${sample_id} \
--hlaPath $now_path/ana/${sample_id}_winners.hlas \
--HLAfastaLoc /software/lohhla_hg38/data/abc_complete.fasta \
--CopyNumLoc $now_path/ana/${sample_id}_ascat.txt \
--mappingStep TRUE --minCoverageFilter 10 --fishingStep TRUE --cleanUp FALSE \
--gatkDir /software/picard-tools-1.122 \
--novoDir /opt/conda/bin \
--HLAexonLoc /software/lohhla_hg38/data/hla.dat

tar -zcvf ./ana/${sample_id}_output.tgz ./ana/${sample_id}_output

>>>
runtime {
docker : docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}

output {
Array[File] lohhla_xls = glob("./ana/${sample_id}_output/*.xls")
Array[File] lohhla_pdf = glob("./ana/${sample_id}_output/Figures/*.pdf")
Array[File] lohhla_tgz = glob("./ana/*.tgz")
}

}



+ 31
- 0
workflow.wdl 查看文件

@@ -0,0 +1,31 @@
import "./tasks/lohhla.wdl" as lohhla
workflow run_lohhla {
String sample_id
File normBAM
File normBAM_bai
File tumorBAM
File tumorBAM_bai
File hlas
File ascat

String lohhla_docker
String lohhla_cluster
String disk_size

call lohhla.lohhla as lohhla {
input:
sample_id=sample_id,
normBAM=normBAM,
normBAM_bai=normBAM_bai,
tumorBAM=tumorBAM,
tumorBAM_bai=tumorBAM_bai,
hlas=hlas,
ascat=ascat,
docker=lohhla_docker
cluster=lohhla_cluster,
disk_size=disk_size

}


}

Loading…
取消
儲存