Skip to content

Commit

Permalink
On branch master
Browse files Browse the repository at this point in the history
bin/varscanSomaticFilter.py added
  • Loading branch information
yil8 committed Sep 1, 2013
1 parent bfda504 commit 386cf5a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions bin/varscanSomaticFilter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python

import sys

def main():
infile = open(sys.argv[1])
outfile = open(sys.argv[2], 'w')
depth_thred = int(sys.argv[3])

for line in infile:
if line[0:5] == 'chrom':
continue

fields = line.split('\t')
a_T = int(fields[8])
b_T = int(fields[9])
d_T = a_T + b_T
somatic_status = fields[12]

if d_T >= depth_thred and somatic_status == 'Somatic':
outfile.write(line)

infile.close()
outfile.close()

if __name__ == '__main__':
main()

0 comments on commit 386cf5a

Please sign in to comment.