# Raw K-mer counts
my.counts1 = selex.counts(sample=r0, k=16, top=100)
# Include reads whose variable regions begin with TGTA
regex = selex.seqfilter(variableRegionIncludeRegex="^TGTA")
my.counts2 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Exclude reads whose variables regions begin with TGT
regex = selex.seqfilter(variableRegionExcludeRegex="^TGT")
my.counts3 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Extract 13-bp substring from reads whose variable regions begin with TGT
regex = selex.seqfilter(variableRegionGroupRegex="^TGT([ACGT]{13})")
my.counts4 = selex.counts(sample=r0, k=13, top=100, seqfilter=regex)
# Extract 5-bp substring from reads whose variable regions begin with TGT
regex = selex.seqfilter(variableRegionGroupRegex="^TGT([ACGT]{5})")
my.counts5 = selex.counts(sample=r0, k=5, top=100, seqfilter=regex)
# Select variable regions beginning with A and ending with G
regex = selex.seqfilter(kmerIncludeRegex="^A.{14}G")
my.counts6 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Exclude variable regions beginning with A and ending with G
regex = selex.seqfilter(kmerExcludeRegex="^A.{14}G")
my.counts7 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Exclude variable regions beginning with A and ending with G, and display
# 16-mers that start and end with T
regex = selex.seqfilter(kmerExcludeRegex="^A.{14}G",
viewIncludeRegex="^T[ACTG]{14}T")
my.counts8 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Exclude variable regions beginning with A and ending with G, and display
# 16-mers that do not start and end with T
regex = selex.seqfilter(kmerExcludeRegex="^A.{14}G",
viewExcludeRegex="^T[ACTG]{14}T")
my.counts9 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Only count variable regions containing TGTAAAATCAGTGCTG or TGTAAGTGGACTCTCG
regex = selex.seqfilter(kmerIncludeOnly=c('TGTAAAATCAGTGCTG',
'TGTAAGTGGACTCTCG'))
my.counts10 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
# Only display results for the K-mers TGTAAAATCAGTGCTG and TGTAAGTGGACTCTCG
regex = selex.seqfilter(viewIncludeOnly=c('TGTAAAATCAGTGCTG',
'TGTAAGTGGACTCTCG'))
my.counts11 = selex.counts(sample=r0, k=16, top=100, seqfilter=regex)
Run the code above in your browser using DataLab