Created
September 18, 2019 07:44
-
-
Save ag1805x/63007cf0ba20b078d6d3c849064a1bff to your computer and use it in GitHub Desktop.
Code to generate tx2gene from reference transcriptome for use with tximport() in R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code to generate tx2gene from reference transcriptome for use with tximport() in R | |
# Reference transcriptome: wget ftp://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz | |
zcat Homo_sapiens.GRCh38.cdna.all.fa.gz | grep '>' | cut -d ' ' -f1,4,7 > temp | |
paste <(cut -d '>' -f2 temp | cut -d ' ' -f1) <(cut -d ' ' -f2 temp | cut -d ':' -f2) <(cut -d ' ' -f3 temp | cut -d ':' -f2) >> tx2gene.txt | |
rm temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think the file was too big to be uploaded to Git. That is why I have put the link to download the reference genome as well. This way you could do it for any version of the Ensembl genome.