Get TSS information from GFF3 file depending on strand
1
0
Entering edit mode
3.1 years ago
S.Fajon • 0

Hello everyone,

I would like to extract my gene's TSS information from my gff3 file, depending on the strand they are on. I would like to do so in order to plot chip-seq peaks occupancy near TSS with deeptools computeMatrix reference-point.

These are the first lines of my gff and basically I extracted the information of colum 4 or 5 depending on the + or - strand and created a new file. Of course when I did that it did not respect the gff format anymore and computeMatrix did not accept it. Do you have any simple way of making this work?

    ##gff-version 3
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    7295    16807   .   +   .   ID=TrA0001W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    17180   19774   .   -   .   ID=TrA0002C
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    20663   21727   .   +   .   ID=TrA0003W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    22342   23250   .   +   .   ID=TrA0004W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    23673   24498   .   +   .   ID=TrA0005W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    25499   26482   .   +   .   ID=TrA0006W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    27933   28859   .   +   .   ID=TrA0007W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    30438   31469   .   +   .   ID=TrA0008W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    32807   33574   .   +   .   ID=TrA0009W
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    33924   35719   .   -   .   ID=TrA0010C
chrI    Li et al. 2017 (maj TFW mars 2018)  Gene    36766   38443   .   -   .   ID=TrA0011C

Thank you for your help!

TSS GFF • 1.1k views
ADD COMMENT
0
Entering edit mode
3.1 years ago

You could try

grep -i "+" input.gff3 > output.positive.gff3

and

grep -i "-" input.gff3 > output.negative.gff3

This probably will work better

awk '$7 == "+"' input.gff3 | awk '{print $4, $5}' > output.positive.gff3

awk '$7 == "-"' input.gff3 | awk '{print $4, $5}' > output.negative.gff3
ADD COMMENT
0
Entering edit mode

Thank you for your answer! I tried to extract the information like that but then computeMatrix did not accept my file. I guess I just need guidance on what structure my file must have and how I should get it in instance for me to give to computeMatrix.

ADD REPLY

Login before adding your answer.

Traffic: 1874 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6