Query nucleotide or amino acid sequence to session's DAS server

Share:

Description

This function retrieves the nucleotide or amino acid sequence for the given ranges using the corresponding data source id (or title) in the session's DAS server

Usage

1
    getDasSequence(source,ranges, class=c("character", "DNAStringSet", "RNAStringSet", "AAStringSet"))

Arguments

source

Data source id (or title). See getDasSource.

ranges

GRanges object containing the seqname(s) and range(s) to query. Make sure this information is consistent with those returned by getDasEntries.

class

Instance of the class to be used in the output. By default it returns a regular character vector, but we recomend using Biostring classes for retrieving large sequences. Most usual Biosting classes are DNAStringSet for genomic sequences, RNAStringSet for transcripts and AAStringSet for aminoacids.

Details

This function allows to query the DAS server and returns the nucleotide or amino acid sequence available at the given ranges.

Please, be sure to pass the identifiers EXACTLY as the values returned by the functions available here (DAS is case-sensitive). It is also recommended that you check the capabilities for each of the data sources.

Please, notice that this function codes the parameters in a URL to query the server. This function could fail if you ask for many ranges. Also, notice that the speed of the query depends on the number of elements and the load in the server.

Please, use this function smartly and do not overload servers.

Value

Nucleotide or amino acid sequences that match the content of the annotation for the given ranges in the server.

If there are not matching results, output is NULL.

Author(s)

Oscar Flores <oflores@mmb.pcb.ub.es>

Anna Mantsoki <anna.mantsoki@bsc.es>

See Also

getDas-functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    # Set session server to the UniProt DAS Reference Server

    setDasServer(server="http://www.ebi.ac.uk/das-srv/uniprot/das")       

    print(getDasServer())

    source <- "uniprot" #Uniprot

    ranges <- GRanges(c("A0A000","A0A001"), IRanges(start=c(1,1), end=c(394,591)))

    sequences <- getDasSequence(source, ranges)

    print(sequences)