This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to extract promoter sequences from rice transcriptome.gtf file ?

Hello researchers,

I am stuck in my project and require an effective solution

  1. How to extract promoter sequences from rice transcriptome.gtf file?
  2. How to extract promoter sequences 2kb from rice transcriptome.gtf file?
  3. How to extract promoter sequences downstream 2kb from rice transcriptome.gtf file?

Thank you

gtf

Do you have chromosome/scaffold lengths for rice? and post lines for which you would need upstream and downstream elements. You would need each chromosome/scaffold length, genome sequence and bedtools. use functions flank and getfasta from bedtools.

Basically promoter means up stream of the TSS, and TSS is the annotated start of each transcript. Hence, get start coordinates per transcript (it is the "end" coordinate of in the - strand), and then get 500bp upstream which is like the default for promoter approximation. Then use mentioned tools to get fasta sequences.

2 answers

Hi,

You may try the CLI interface (gtftk) of Python GTF toolkit. Although it may be slower it offers additional arguments to transfert transcript informations into the 4th colum.

gtftk get_example | gtftk select_by_key -k feature -v transcript | gtftk get_5p_3p_coords -n gene_id,transcript_id  -m promoter -s '|'

Best

Disclosure: I'm the pygtftk developer.

You might find usefull information here https://github.com/NBISweden/AGAT/issues/89 and here Extracting genomic feature sequences from GTF/GFF files with AGAT

To get the 2kb upstream region from tss with AGAT:
agat_sp_extract_sequences.pl --gff input.gff --fasta input.fasta -t transcript --eo --up "2000"

To get the 2kb downstreamregion from tss with AGAT:
agat_sp_extract_sequences.pl --gff input.gff --fasta input.fasta -t transcript --eo --down "2000"

*replace transcript by mRNA depending how it is called in te 3rd column of your file.

Log in to answer this question.