Skip to content

Commit

Permalink
remove requirement for at least 10 tumor reads, do this in downstream…
Browse files Browse the repository at this point in the history
… analysis instead
  • Loading branch information
ereznik committed Aug 21, 2017
1 parent dc1af35 commit 4e2c6ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions analysis/MTvariantpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@

vcf = pd.read_csv( vcfdir + f + '_temp.vcf', header = 0,sep = '\t',skiprows = skip_rows )
vcf = vcf[vcf['ALT'] != '.'] # drop any sites with no alterative variant
vcf['AltDepths_Tumor'] = [vcf.ix[item,9].split(':')[-1].split(',')[1:] for item in vcf.index]
vcf['MaxDepth_Tumor'] = [ np.max([int(item2) for item2 in item]) for item in vcf['AltDepths_Tumor'] ]
vcf = vcf[vcf['MaxDepth_Tumor'] >= 10]
#vcf['AltDepths_Tumor'] = [vcf.ix[item,9].split(':')[-1].split(',')[1:] for item in vcf.index]
#vcf['MaxDepth_Tumor'] = [ np.max([int(item2) for item2 in item]) for item in vcf['AltDepths_Tumor'] ]
#vcf = vcf[vcf['MaxDepth_Tumor'] >= 10]

# Write out VCF, making sure to remove the extra allele depth columns
vcf = vcf.drop( ['AltDepths_Tumor','MaxDepth_Tumor'], axis = 1 )
#vcf = vcf.drop( ['AltDepths_Tumor','MaxDepth_Tumor'], axis = 1 )
vcf.to_csv( vcfdir + f + ".vcf", sep = '\t', header = None, index = None, mode = 'a' )

#print(mafcall)
Expand Down

0 comments on commit 4e2c6ac

Please sign in to comment.