High Level Functions¶
-
pyrefinebio.high_level_functions.
create_token
(agree_to_terms=None, save_token=None)¶ Automatically creates a Token, activates it, and stores it to the Config file.
By default, will prompt the user before activating and storing the created Token.
- Returns:
Token
- Parameters:
agree_to_terms (bool) – if true, the token will be automatically activated without prompting. If false, the token will not be activated. Leave as None to be prompted before activating.
save_token (bool) – if true, the token will be automatically saved. If false, the token will not be saved. Leave as None to be prompted before saving.
-
pyrefinebio.high_level_functions.
download_compendium
(path, organism, version=None, quant_sf_only=False, extract=False, prompt=True)¶ Download a Compendium for the specified organism.
- Returns:
Compendium
- Parameters:
path (str) – the path that the Compendium should be downloaded to
organism (str) – the name of the Organism for the Compendium you want to download
version (int) – the version for the Compendium you want to download - None for latest version
quant_sf_only (bool) – true for RNA-seq Sample Compendium results or False for quantile normalized
extract (bool) – if true, the downloaded zip file will be automatically extracted
prompt (bool) – if true, will prompt before downloading files bigger than 1GB
-
pyrefinebio.high_level_functions.
download_dataset
(path, email_address, dataset_dict=None, experiments=None, aggregation='EXPERIMENT', transformation='NONE', skip_quantile_normalization=False, quant_sf_only=False, timeout=None, extract=False, prompt=True, notify_me=False)¶ Automatically constructs a Dataset, processes it, waits for it to finish processing, then downloads it to the path specified.
- Returns:
Dataset
- Parameters:
path (str) – the path that the Dataset should be downloaded to
email_address (str) – the email address that will be contacted with info related to the dataset
dataset_dict (dict) –
a fully formed Dataset data attribute in the form: {
- ”Experiment”: [
“Sample”, “Sample”
]
} use this parameter if you want to specify specific Samples for your dataset each part of the dict can be a pyrefinebio object or an accession code as a string
experiments (list) – a list of Experiments that should be added to the dataset use this parameter if you only care about the Experiments - all available samples related to each Experiment will be added the list can contain Experiment objects or accession codes as strings
aggregation (str) – how the Dataset should be aggregated - by EXPERIMENT, by SPECIES, or by ALL
transformation (str) – the transformation for the dataset - NONE, MINMAX, or STANDARD
skip_quantile_normalization (bool) – control whether or not the dataset should skip quantile normalization for RNA-seq Samples
quant_sf_only (bool) – include only quant.sf files in the generated dataset.
timeout (datetime.timedelta) – if specified the function will return None after timeout is reached.
extract (bool) – if true, the downloaded zip file will be automatically extracted
prompt (bool) – if true, will prompt before downloading files bigger than 1GB
notify_me (bool) – if true, refine.bio will send you an email when the dataset has finished processing. Defaults to False.
-
pyrefinebio.high_level_functions.
download_quantfile_compendium
(path, organism, version=None, extract=False, prompt=True)¶ Download a Compendium for the specified organism. This function will always download RNA-seq Sample Compedium results.
- Returns:
Compendium
- Parameters:
path (str) – the path that the Compendium should be downloaded to
organism (str) – the name of the Organism for the Compendium you want to download
version (int) – the version for the Compendium you want to download - None for latest version
extract (bool) – if true, the downloaded zip file will be automatically extracted
prompt (bool) – if true, will prompt before downloading files bigger than 1GB
-
pyrefinebio.high_level_functions.
help
(entity=None)¶ Help
Prints out information about pyrefinebio’s classes and functions. To get information about a class method, pass in the class name and method name separated by either a space or a .
Examples
getting information about classes:
>>> pyrefinebio.help("Sample")
getting information about class methods:
>>> pyrefinebio.help("Sample.get") or >>> pyrefinebio.help("Sample get")
getting information about functions:
>>> pyrefinebio.help("download_dataset")