LUYAO REN il y a 4 ans
Parent
révision
c089399e35
2 fichiers modifiés avec 9 ajouts et 3 suppressions
  1. +1
    -1
      codescripts/merge_two_family_with_genotype.py
  2. +8
    -2
      tasks/benchmark.wdl

+ 1
- 1
codescripts/merge_two_family_with_genotype.py Voir le fichier

@@ -78,7 +78,7 @@ for row in merged_genotype_df_sub.itertuples():
else:
mendelian = mendelian + ':' + row.TRIO5.split('=')[1]
# family trio6
if row.LCL6 == row. LCL7 == row.LCL8 == './.':
if row.LCL6 == row.LCL7 == row.LCL8 == './.':
mendelian = mendelian + ':noInfo'
elif row.LCL6 == row. LCL7 == row.LCL8 == '0/0':
mendelian = mendelian + ':Ref'

+ 8
- 2
tasks/benchmark.wdl Voir le fichier

@@ -21,8 +21,14 @@ task benchmark {
cat unzip.vcf | grep '#CHROM' > name
cat unzip.vcf | grep -v '#' > body
cat body | grep -w '^chr1\|^chr2\|^chr3\|^chr4\|^chr5\|^chr6\|^chr7\|^chr8\|^chr9\|^chr10\|^chr11\|^chr12\|^chr13\|^chr14\|^chr15\|^chr16\|^chr17\|^chr18\|^chr19\|^chr20\|^chr21\|^chr22\|^chrX' > body.filtered
cat body.filtered | grep -v '0/0' > body.filtered.gt
cat unzip.vcf | grep '##' | grep -v 'contig' | cat - ${contig} name body.filtered.gt > filtered.vcf

if grep -q PASS "body.filtered"; then
cat body.filtered | grep -v '0/0' | grep 'PASS' > body.filtered.gt
cat unzip.vcf | grep '##' | grep -v 'contig' | cat - ${contig} name body.filtered.gt > filtered.vcf
else
cat body.filtered | grep -v '0/0' > body.filtered.gt
cat unzip.vcf | grep '##' | grep -v 'contig' | cat - ${contig} name body.filtered.gt > filtered.vcf
fi

echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tLCL5" > LCL5_name
echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tLCL6" > LCL6_name

Chargement…
Annuler
Enregistrer