genos.api.rna_seq_coverage_track_prediction

Functions

check_chromosome(chrom)

Check if the chromosome is valid.

check_valid_parameters(chrom, start_pos[, ...])

Check if the parameters are valid.

get_start_position_range(chrom[, gen_length])

Return the allowed range for start_pos for the given chromosome.

Classes

RNASeqCoverageTrackPredictionAPI(session, ...)

Client for the RNA-seq Coverage Track Prediction service in GeneOS.

check_chromosome(chrom: str) bool[source]

Check if the chromosome is valid.

get_start_position_range(chrom: str, gen_length: int = 32000)[source]

Return the allowed range for start_pos for the given chromosome. Allowed: 1 ~ (chrom_length - 32000), inclusive.

Raises:

ValueError – If the chromosome is not recognized.

check_valid_parameters(chrom: str, start_pos: int, gen_length: int = 32000)[source]

Check if the parameters are valid. :param chrom: Chromosome name. :type chrom: str :param start_pos: Start position. :type start_pos: int :param gen_length: Generation length. :type gen_length: int

Returns:

True if the parameters are valid, False otherwise.

class RNASeqCoverageTrackPredictionAPI(session: Session, base_url: str, timeout: int = 30)[source]

Bases: BaseAPI

Client for the RNA-seq Coverage Track Prediction service in GeneOS.

This class provides access to RNA-seq Coverage Track Prediction models, allowing users to predict the coverage track of an RNA-seq experiment based on the genomic coordinates.

predict(chrom: str, start_pos: int) dict[source]

Predict the coverage track of an RNA-seq experiment based on the genomic coordinates.

Parameters:
  • chrom (str) – Chromosome name.

  • start_pos (int) – Start position.

Returns:

A JSON response from the RNA-seq Coverage Track Prediction model containing the predicted coverage track.

Return type:

dict

Raises:
  • ValueError – If the parameters are invalid.

  • APIRequestError – If the API request fails.