@dktanwar
Hi,
we need to modify your function: right now, if a reads map to 2 locations but only one of the locations overlaps with a feature, it's unambiguously assigned to that feature because the other location doesn't show up in the results.
After doing the overlap, I would take the sequences that are not in the overlap, and built a second table in the same format as the first, but setting (since there's no overlap):
strandFeature=NA
posInFeature=NA
overlap=0
percentOverlap=0
transcript_id=NA
gene_id=NA
transcript_type=NA
then we can rbind the two tables, order by sequence, and return the result.
[x] add alignments without overlaps (see above)
[x] change percentOverlap so that:
[x] the denominator is the read length (not the feature length)
[x] it's actually a percentage (multiply by 100)
[x] add featureLength as a column of the table
[x] add an ignore.strand argument to the function which is passed to findOverlaps, and set it to default TRUE
@dktanwar Hi, we need to modify your function: right now, if a reads map to 2 locations but only one of the locations overlaps with a feature, it's unambiguously assigned to that feature because the other location doesn't show up in the results. After doing the overlap, I would take the sequences that are not in the overlap, and built a second table in the same format as the first, but setting (since there's no overlap): strandFeature=NA posInFeature=NA overlap=0 percentOverlap=0 transcript_id=NA gene_id=NA transcript_type=NA then we can rbind the two tables, order by sequence, and return the result.