Skip to content

Separate upstream and downstream flanks #930

@yaaminiv

Description

@yaaminiv

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.

Screen Shot 2020-05-11 at 3 04 59 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions