C# Class LibiadaWeb.Helpers.NcbiHelper

The ncbi helper.
Mostra file Open project: intervals-mining-lab/libiada-web

Public Methods

Method Description
ExtractSequenceName ( Bio.IO.GenBank.GenBankMetadata metadata ) : string

Extracts supposed sequence name from metadata.

GetFastaFileStream ( string id ) : Stream

The get file.

GetFastaSequence ( Stream fastaFileStream ) : ISequence

Downloads sequence as fasta file from ncbi.

GetFeatures ( string id ) : List

Extracts features from genBank file downloaded from ncbi.

GetFeatures ( string ids ) : List[]

Extracts features from genBank files downloaded from ncbi.

GetGenBankSequences ( string ids ) : ISequence[]

Extracts sequences from genbank files.

GetMetadata ( ISequence sequence ) : Bio.IO.GenBank.GenBankMetadata

Extracts metadata from genbank file.

Private Methods

Method Description
GetEfetchParamsString ( string retType ) : string

Creates efetch params string with given return type.

GetGenBankSequence ( string id ) : ISequence

Extracts sequence from genbank file.

GetResponseStream ( string url ) : Stream

The get response.

Method Details

ExtractSequenceName() public static method

Extracts supposed sequence name from metadata.
/// Thrown if all name fields are contradictory. ///
public static ExtractSequenceName ( Bio.IO.GenBank.GenBankMetadata metadata ) : string
metadata Bio.IO.GenBank.GenBankMetadata /// The metadata. ///
return string

GetFastaFileStream() public static method

The get file.
public static GetFastaFileStream ( string id ) : Stream
id string /// Accession id of the sequence in ncbi (remote id). ///
return Stream

GetFastaSequence() public static method

Downloads sequence as fasta file from ncbi.
public static GetFastaSequence ( Stream fastaFileStream ) : ISequence
fastaFileStream Stream /// The fasta file stream. ///
return ISequence

GetFeatures() public static method

Extracts features from genBank file downloaded from ncbi.
public static GetFeatures ( string id ) : List
id string /// Accession id of the sequence in ncbi (remote id). ///
return List

GetFeatures() public static method

Extracts features from genBank files downloaded from ncbi.
public static GetFeatures ( string ids ) : List[]
ids string /// Accession ids of the sequences in ncbi (remote ids). ///
return List[]

GetGenBankSequences() public static method

Extracts sequences from genbank files.
public static GetGenBankSequences ( string ids ) : ISequence[]
ids string /// The ids. ///
return ISequence[]

GetMetadata() public static method

Extracts metadata from genbank file.
/// Thrown if metadata is abscent. ///
public static GetMetadata ( ISequence sequence ) : Bio.IO.GenBank.GenBankMetadata
sequence ISequence /// Sequence extracted from genbank file. ///
return Bio.IO.GenBank.GenBankMetadata