-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
Description
In this notebook, I'm trying to separate upstream and downstream flanks. I created flanks with flankBed, and tried separating up and downstream flanks for forward and reverse strands using this code:
#Select forward strands
#Separate upstream and downstream flanks
!grep "+" Mcap.GFFannotation.flanks.gff \
| awk '{ if (NR%2) print > "Mcap.GFFannotation.flanks.forwardUpstream.gff"; \
else print > "Mcap.GFFannotation.flanks.forwardDownstream.gff" }'
I repeated this with reverse strands, then used cat to create an upstream track for all upstream flanks and a downstream track for all downstream flanks. Looking at IGV, I can tell this code does not work for all genes.
My guess is that some genes only have a single associated flank (up or downstream), so trying to separate every other flank entry as an upstream or downstream flank is causing these inconsistencies.
How can I correctly separate upstream and downstream flanks for forward and reverse strands?
Looking at flankBed documentation I tried using -l on its own, but that did not work.
