Hot answers tagged

8

I am unaware of any "official" or gold-standard UTR annotations in S. cerevisiae. One option is to use the annotations from the TIF-Seq publication (Pelechano et al. 2013). The GSE39128_tsedall.txt.gz file contains the major isoforms identified. It would be up to you to computational associate each transcript with a given gene. It is also up to you to ...


8

As Ian explained, these are different transcripts which happen to have the same start and end positions. You have no information on their exonic structure in that file. However, if you look them up at EnsEMBL, you will see: Transcript Y74C9A.2b.1 : 1 Y74C9A.2b.1.e1 11,499 11,561 - - 63 Intron 1-2 11,562 11,617 56 2 Y74C9A.2b.1....


7

Here you can find some example R code to compute the gene length given a GTF file (it computes GC content too, which you don't need). This uses one of a number of ways of computing gene length, in this case the length of the "union gene model". In this method, the non-duplicated exons for each gene are simply summed up ("non-duplicated" in that no genomic ...


7

transcript objects cover the co-ordinates from the start of the first exon to the end of the last exon of a transcript (i.e. an isoform). If two different isoforms share the same first and last exons, but have a different set of internal exons, then their transcript entries will be the same, but the set of exon entires associated with each transcript will be ...


6

I found the following two files in https://downloads.yeastgenome.org/sequence/S288C_reference/: SGD_all_ORFs_3prime_UTRs.fsa SGD_all_ORFs_5prime_UTRs.fsa According to the README files in the same directory, these are (the README for the 5' file is equivalent): SGD_all_ORFs_3prime_UTRs.README Information about the SGD_all_ORFs_3prime_UTRs.fsa file. ...


5

The following bit of python code should work: #!/usr/bin/env python import sys lastTranscript = [None, None, None, []] # ID, chrom, strand, [(start, end, score), ...] def getID(s): """Parse out the ID attribute""" s = s.split(";") for k in s: if k.startswith("ID="): return k[3:] return None def dumpLastTranscript(): ...


5

You will probably be interested in the following UCSC wiki page, which explains how to go from most of the UCSC tables to GTF/GFF: http://genomewiki.ucsc.edu/index.php/Genes_in_gtf_or_gff_format The basic gist is that UCSC doesn't store any data internally as GTF or GFF, and so you will need to use our genePredToGtf utility in order to convert from our ...


5

I would consider the description there a bug. The filter is actually the strand, strand is the frame, group is the attribute, and attribute does nothing. These are really meant to be the 9 columns. Edit: There's a bug report related to this. Edit 2: I've made a pull request to clarify this and fix the aforementioned bug report. Edit 3: I realized that I ...


5

In one line, using bedtools zcat Homo_sapiens.GRCh38.93.gtf.gz \ | awk '$3=="gene"' \ | bedtools slop -b 10000 -g contigs.tsv -i - \ | bedtools intersect -u -a intervals.bed -b - This first takes the genes and filters them for the third column being gene. This is important because all GTF lines contain the word gene as gene_id is a manditory attribute ...


5

Here's a way to use BEDOPS, which was designed to work fast by using sorted input. Other tools now use sorting to accomplish similar performance benefits. Convert GTF annotations to a sorted BED file of genes: $ awk '($3=="gene")' annotations.gtf | gtf2bed - > genes.bed Sort your intervals, if unsorted: $ sort-bed intervals.unsorted.bed > intervals....


5

You can use gffread to convert gff to gtf2, below is from the manual: In order to see the GTF2 version of the same transcripts, the -T option should be added: gffread -E annotation.gff -T -o- | more The examples above also show that gffread can be used to convert a file between GTF2 and GFF3 file formats.


4

Getting the non coding regions of a protein coding transcript, sounds like you are looking for UTR. UTR has its own feature in the gtf file. So you can do this: $ awk -v FS="\t" '$3=="UTR"' gencode.gtf If the gtf file is compressed use this instead: $ zcat gencode.gtf.gz | awk -v FS="\t" '$3=="UTR"' BTW: Why are you using such an old ...


4

In your case, I would definitely suggest following @Emily_Ensembl's advice and using the Arabidopsis GTF from Ensembl. But for future reference, if an Ensembl GTF wasn't available, you could build something like this using the gtf class from cgat The cgat module and dependancies can be installed by following the instructions here. Specifically, you can ...


3

"Transforming" Fasta files to GTF or GFF3 files is a common request, as are similar tasks such as "converting" BAM files to VCF files. But these are underdefined questions, and "transform" or "convert" isn't really the right way to think about the task. As far as your particular request is concerned, Fasta files and GTF files contain fundamentally different ...


3

This isn't a problem that's easily solved with awk. It's not like you're extracting a feature that's annotated in the GTF file. Instead, you want the empty space between annotated features. A few years ago I wrote a program called LocusPocus for a similar task. It uses a gene annotation to break down a genome into gene loci and intergenic regions. It ...


3

First I prepared a bed file in which the gene intervals are augmented by 1KB before and after the gene start and end coordinates. Then I intersected this bed file with my original one with the option -wa, therefore retaining only the intervals in my original bed file that intersect with the bedfile produced from the original gtf, filtered by gene regions. ...


3

I don't see how your awk command would work since you're using whitespace as a field delimiter. In any case, you can use a much shorter perl command for this: $ perl -lne 'print "@m" if @m=(/((?:transcript_id|gene_name|transcript_name)\s+\S+)/g);' Homo_sapiens.GRCh37.70.gtf transcript_id "ENSG00000223972.5"; gene_name "DDX11L1"; transcript_name "DDX11L1"; ...


3

To my knowledge there's no defined way to deal with that in GTF. GFF3 handles trans-splicing (you'll have to scroll down to "trans-spliced transcript") by giving an individual transcript multiple parents (e.g., ID=some_transspliced_gene;Parent=gene1,gene2). You could use the same methodology with GTF files, but just note that it'll break most downstream ...


3

Since there doesn't seem to be an easy way to run this in parallel, you could instead break the job into sections. For example, separate each chromosome into its own gtf file, extract the sequences using that file and then cat them all together. The commands would be something like this (using the human hg38 genome and the gff GENCODE annotations downloaded ...


3

This seems to be a common problem. As @llrs pointed out, Ensembl, UCSC(genome browser and associated data) and NCBI records are not directly interchangeable. The ambiguity refers to annotation as well as the reference genome. The reference genome is identical, except for the chromosome naming convention, meaning a reference from Ensembl might not contain CHR ...


3

I would suggest to use agat_convert_sp_gff2gtf.pl from AGAT because you loose information with gffread. e.g here a gff example: ##gff-version 3 scaffold625 maker gene 337818 343277 . + . ID=CLUHARG00000005458;Name=TUBB3_2 scaffold625 maker transcript 337818 343277 . + . ID=CLUHART00000008717;Parent=CLUHARG00000005458 scaffold625 ...


3

Following up on zorbax's answer, you could read in and filter the GTF file in this way, among others: #!/usr/bin/env python import gtfparse as gp gtf_file = "test.gtf" test_list = ["PCNA", "USP21", "USP1"] df = gp.read_gtf(gtf_file) subset = df[df['gene_name'].str.contains('|'.join(test_list))] print(subset) You ...


2

You shouldn't delete them while featureCounts is running, it's creating read-name-sorted temporary files so it can more easily look at both mates together. Just wait for it to finish running and it will clean up the files itself. Doing so beforehand is liable to cause an error.


2

Instead of the "gene_id ..." bit, you want sprintf("gene_id \"%s\"; transcript_id \"%s:%s-%s\"", $4, $1, $2, $3).


2

As was suggested by @benn, you will need to add the TdTomato sequence to the end of your fasta formatted genome file. If your TdTomato sequence is in fasta format already, cat will do the trick. If not, just go the end of the file, start a new line and add a header line starting with ">" then immediately the name of your gene, no whitespcaes in between, ...


2

If you want all transcripts from that gtf file whose type isn't "protein_coding", you can use almost the same command, just change the == ("is") to != ("isn't"): awk '{if($3=="transcript" && $20!="\"protein_coding\";"){print $0}}' gencode.gtf Or, a simpler version: awk '$3=="transcript" && $20!="\"protein_coding\";"' gencode.gtf Note ...


2

The most recent annotation of GRCh37 assembly by NCBI RefSeq is here: https://ftp.ncbi.nlm.nih.gov/genomes/Homo_sapiens/GRCh37.p13_interim_annotation/ You can download the annotation in GFF3 format from that path and use it with featurecounts tool by first converting it to the SAF format using the commands shown below: $ zgrep -v '^#' annotation.gff.gz \ ...


2

If you have your gtf file like a DataFrame you can use: df[df['gene_name'].str.contains('|'.join(test_list))]


1

Since you know that your sequences in your fastas are your genes of interest, why not just dummy up a gtf where every sequence is a gene? The point of a gtf is to tell software which genomic regions matter for a certain procedure, and which regions do not. But if you already know that your sequences are pared down to genes, then you know that the whole ...


1

I was wanting more time, but okay here's what I'm thinking, Would it make more sense to use the strain used as the vaccine candidate as the reference genome? Neither, because the GTF format is based on an HA protein structure (likely a crystal structure but could be cryoEM). This is not the same as an alignment position within a surface antigen, ...


Only top voted, non community-wiki answers of a minimum length are eligible