Przeglądaj źródła

Alter: input

master
YaqingLiu 4 lat temu
rodzic
commit
89de86843e
4 zmienionych plików z 86 dodań i 95 usunięć
  1. BIN
      .DS_Store
  2. +2
    -2
      defaults
  3. +70
    -75
      tasks/pindel.wdl
  4. +14
    -18
      workflow.wdl

BIN
.DS_Store Wyświetl plik


+ 2
- 2
defaults Wyświetl plik

@@ -1,6 +1,6 @@
{
"reference":"oss://pgx-reference-data/reference/pindel/GRCh38.d1.vd1.fa",
"reference_fai":"oss://pgx-reference-data/reference/pindel/GRCh38.d1.vd1.fa.fai"
"reference":"oss://pgx-reference-data/GRCh38.d1.vd1/GRCh38.d1.vd1.fa",
"reference_fai":"oss://pgx-reference-data/GRCh38.d1.vd1/GRCh38.d1.vd1.fa.fai",
"pindel_docker":"registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/pindel:0.2.5b9_3",
"pindel_cluster":"OnDemand bcs.a2.3xlarge img-ubuntu-vpc",
"disk_size":"200"

+ 70
- 75
tasks/pindel.wdl Wyświetl plik

@@ -1,80 +1,75 @@
task pindel{
String sample_id
File bam
File reference
File reference_fai
task pindel {
String sample_id
File bam
File reference
File reference_fai

String docker
String cluster
String disk_size
String docker
String cluster
String disk_size


command <<<
command <<<
set -o pipefail
set -e

mkdir ./pindel_result/
mkdir ./input

cp ${bam} ./input

bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`
samtools index -@ 4 ./input/$bam_file_name
java "-Xmx16G" -jar /software/picard/picard.jar CollectInsertSizeMetrics \
-H ./pindel_result/${sample_id}_picard.pdf \
-I ./input/$bam_file_name \
-O ./pindel_result/${sample_id}_picard.txt

mean_insert_size=`cat pindel_result/${sample_id}_picard.txt|sed -n '8p'|cut -f 6|cut -d . -f 1`
bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`

echo -e "./input/$bam_file_name\t$mean_insert_size\t${sample_id}" > ${sample_id}_config.txt

pindel -i ${sample_id}_config.txt \
-f ${reference} \
-o ./pindel_result/${sample_id} \
-c all \
-T 4 \
-x 4 \
-l \
-B 0 \
-M 3 \
-J /software/picard/hg38_ucsc_centromere.bed

grep "ChrID" pindel_result/${sample_id}_SI > pindel_result/${sample_id}_all_indel
grep "ChrID" pindel_result/${sample_id}_D >> pindel_result/${sample_id}_all_indel

awk -v chrID="chr1" '$8==chrID {print}' pindel_result/${sample_id}_all_indel > pindel_result/${sample_id}_indel
for i in `seq 2 22` X Y M
do
awk -v chrID=chr$i '$8==chrID {print}' pindel_result/${sample_id}_all_indel >> pindel_result/${sample_id}_indel
done

pindel2vcf -r ${reference} \
-R GRCh38.d1.vd1 \
-d GDC \
-p pindel_result/${sample_id}_indel \
-v pindel_result/${sample_id}.pindel.indel.vcf


>>>
set -o pipefail
set -e

mkdir ./pindel_result/
mkdir ./input

cp ${bam} ./input

bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`
samtools index -@ 4 ./input/$bam_file_name
java "-Xmx16G" -jar /software/picard/picard.jar CollectInsertSizeMetrics \
-H ./pindel_result/${sample_id}_picard.pdf \
-I ./input/$bam_file_name \
-O ./pindel_result/${sample_id}_picard.txt

mean_insert_size=`cat pindel_result/${sample_id}_picard.txt|sed -n '8p'|cut -f 6|cut -d . -f 1`
bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`

echo -e "./input/$bam_file_name\t$mean_insert_size\t${sample_id}" > ${sample_id}_config.txt

pindel -i ${sample_id}_config.txt \
-f ${reference} \
-o ./pindel_result/${sample_id} \
-c all \
-T 4 \
-x 4 \
-l \
-B 0 \
-M 3 \
-J /software/picard/hg38_ucsc_centromere.bed

grep "ChrID" pindel_result/${sample_id}_SI > pindel_result/${sample_id}_all_indel
grep "ChrID" pindel_result/${sample_id}_D >> pindel_result/${sample_id}_all_indel

awk -v chrID="chr1" '$8==chrID {print}' pindel_result/${sample_id}_all_indel > pindel_result/${sample_id}_indel
for i in `seq 2 22` X Y M
do
awk -v chrID=chr$i '$8==chrID {print}' pindel_result/${sample_id}_all_indel >> pindel_result/${sample_id}_indel
done

pindel2vcf -r ${reference} \
-R GRCh38.d1.vd1 \
-d GDC \
-p pindel_result/${sample_id}_indel \
-v pindel_result/${sample_id}.pindel.indel.vcf
>>>
runtime {
docker : docker
cluster : cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/
}

output {
Array[File] pindel_result=glob("./pindel_result/${sample_id}*")
}

}


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

output {
Array[File] pindel_result = glob("./pindel_result/${sample_id}*")
}
}

+ 14
- 18
workflow.wdl Wyświetl plik

@@ -1,22 +1,18 @@
import "./tasks/pindel.wdl" as pindel

workflow run_pindel {
String sample_id
File bam
File reference
File reference_fai

String pindel_docker

call pindel.pindel as pindel {
input:
sample_id=sample_id,
bam=bam,
reference=reference,
reference_fai=reference_fai,
docker=pindel_docker
}


}
String sample_id
File bam
File reference
File reference_fai
String pindel_docker

call pindel.pindel as pindel {
input:
sample_id=sample_id,
bam=bam,
reference=reference,
reference_fai=reference_fai,
docker=pindel_docker
}
}

Ładowanie…
Anuluj
Zapisz