Change sequence names

changeSeqnameStyle(gr, dataset, seqname_style_from, seqname_style_to,
    reformat_from = NULL, reformat_to = NULL)

Arguments

gr

The input regions

dataset

A BioMart dataset or a taxon ID. For a proper value, please see supportedOrganisms.

seqname_style_from

Value should be in c("Sequence-Name", "GenBank-Accn", "RefSeq-Accn"). If you are not sure which seqname style is in gr, use getBioMartGenomeInfo to obtain list of examples.

seqname_style_to

Value should be in c("Sequence-Name", "GenBank-Accn", "RefSeq-Accn").

reformat_from

A self-defined function to reformat the seqnames. The internal seqname style can be obtained via getBioMartGenomeInfo(dataset). This function converts the internal "from" seqnames to fit the user's input regions.

reformat_to

A self-defined function to reformat the seqnames.

Details

Please the conversion is not one to one. For those sequences which cannot be corrected mapped to other styles, they are just removed.

Value

A GRanges object.

Examples

if (FALSE) {
gr = getBioMartGenes("giant panda")
changeSeqnameStyle(gr, "giant panda", "Sequence-Name", "GenBank-Accn")
}