Hi,
I wrote a script that looks takes random subsets from a bed file and merges them and sees how many unique loci are in the subset. I want to now see in each subset - how many loci there are that contain at least 10 reads. I have added the n=True to the merge function, but I don't know how to access the field.
Here is my original script:
from pybedtools import BedTool
a = BedTool('libraryA-sorted.bed')
n = 1000
while n < 50000:
b = a.random_subset(n)
merged_b = b.merge(d=10, s=True)
print n, "\t", len(merged_b)
n+=1000
I have added n=True to merged_b = b.merge(d=10, s=True)
Thanks!
Tirza
I wrote a script that looks takes random subsets from a bed file and merges them and sees how many unique loci are in the subset. I want to now see in each subset - how many loci there are that contain at least 10 reads. I have added the n=True to the merge function, but I don't know how to access the field.
Here is my original script:
from pybedtools import BedTool
a = BedTool('libraryA-sorted.bed')
n = 1000
while n < 50000:
b = a.random_subset(n)
merged_b = b.merge(d=10, s=True)
print n, "\t", len(merged_b)
n+=1000
I have added n=True to merged_b = b.merge(d=10, s=True)
Thanks!
Tirza