makeTxToGeneFromFasta: Make a TxToGene object from transcriptome FASTA

View source: R/makeTxToGeneFromFasta.R

makeTxToGeneFromFastaR Documentation

Make a TxToGene object from transcriptome FASTA

Description

Make a TxToGene object from transcriptome FASTA

Usage

makeTxToGeneFromFasta(file, ignoreVersion = FALSE)

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 in txIdVersion and geneIdVersion, and the variants without versions will be stored in txId, txIdNoVersion, geneId, and geneIdNoVersion.

Details

RefSeq transcript FASTA (e.g. "GCF_000001405.39_GRCh38.p13_rna.fna.gz") doesn't contain gene identifiers, and is not supported.

Value

TxToGene.

Note

Updated 2023-11-28.

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)

acidgenomics/r-acidgenomes documentation built on Jan. 12, 2024, 4:06 a.m.