Thanks! This worked like a charm. I appreciate the help.
Hello all,
I have a summarized experiment containing salmon-predicted transcript counts. I am primarily interested in getting the sequence for the 3'utrs for all a gene's various alternative transcripts that have a distinct 3'utr. Im wondering what would be the most efficient way of getting this data. Previously, when working on gene counts, I used the biomart mane select option to download a single representative 3'utr, but I am unsure of how to get transcript-specific 3'utrs from biomart, if that is even possible. Alternatively, is there another database you would recommend? Please let me know your thoughts.
Thanks!
1 answer
get the exons from the protein-coding genes and remove the coordinates of the CDS.
bedtools subtract \
-a <(wget -qO - "https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_47/gencode.v47.annotation.gtf.gz" | gunzip -c | awk -F '\t' '($3=="exon" && $9 ~ /protein_coding/) {printf("%s\t%d\t%s\n",$1,int($4)-1,$5);}' | LC_ALL=C sort -T . -t $'\t' -k1,1 -k2,2n ) \
-b <(wget -qO - "https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_47/gencode.v47.annotation.gtf.gz" | gunzip -c | awk -F '\t' '($3=="CDS" && $9 ~ /protein_coding/) {printf("%s\t%d\t%s\n",$1,int($4)-1,$5);}' | LC_ALL=C sort -T . -t $'\t' -k1,1 -k2,2n ) |\
LC_ALL=C sort -T . -t $'\t' -k1,1 -k2,2n | bedtools merge
Log in to answer this question.