Make a TxToGene object from transcriptome FASTA
Source:R/makeTxToGeneFromFasta.R
makeTxToGeneFromFasta.RdMake a TxToGene object from transcriptome FASTA
Arguments
- file
character(1). File path.- ignoreVersion
logical(1). Ignore identifier (e.g. transcript, gene) versions. When applicable, the identifier containing version numbers will be stored intxIdVersionandgeneIdVersion, and the variants without versions will be stored intxId,txIdNoVersion,geneId, andgeneIdNoVersion.
Details
RefSeq transcript FASTA (e.g. "GCF_000001405.39_GRCh38.p13_rna.fna.gz") doesn't contain gene identifiers, and is not supported.
Examples
## Ensembl ====
## > file <- AcidBase::pasteUrl(
## > "ftp.ensembl.org",
## > "pub",
## > "release-102",
## > "fasta",
## > "homo_sapiens",
## > "cdna",
## > "Homo_sapiens.GRCh38.cdna.all.fa.gz",
## > protocol = "ftp"
## > )
## > t2g <- makeTxToGeneFromFasta(file)
## > print(t2g)
## GENCODE ====
## GRCh38:
## > file <- AcidBase::pasteUrl(
## > "ftp.ebi.ac.uk",
## > "pub",
## > "databases",
## > "gencode",
## > "Gencode_human",
## > "release_32",
## > "gencode.v32.transcripts.fa.gz",
## > protocol = "ftp"
## > )
## > t2g <- makeTxToGeneFromFasta(file)
## > print(t2g)
##
## GRCh37:
## > file <- AcidBase::pasteUrl(
## > "ftp.ebi.ac.uk",
## > "pub",
## > "databases",
## > "gencode",
## > "Gencode_human",
## > "release_44",
## > "GRCh37_mapping",
## > "gencode.v44lift37.transcripts.fa.gz",
## > protocol = "ftp"
## > )
## > t2g <- makeTxToGeneFromFasta(file)
## > print(t2g)
## FlyBase ====
## > file <- AcidBase::pasteUrl(
## > "ftp.flybase.net",
## > "releases",
## > "FB2019_05",
## > "dmel_r6.30",
## > "fasta",
## > "dmel-all-transcript-r6.30.fasta.gz",
## > protocol = "ftp"
## > )
## > t2g <- makeTxToGeneFromFasta(file)
## > print(t2g)
## WormBase ====
## > file <- AcidBase::pasteUrl(
## > "ftp.wormbase.org",
## > "pub",
## > "wormbase",
## > "releases",
## > "WS272",
## > "species",
## > "c_elegans",
## > "PRJNA13758",
## > "c_elegans.PRJNA13758.WS272.mRNA_transcripts.fa.gz",
## > protocol = "ftp"
## > )
## > t2g <- makeTxToGeneFromFasta(file)
## > print(t2g)