autogating: Automatic gating Endpoints

autogatingR Documentation

Automatic gating Endpoints

Description

Automatic gating Endpoints

Usage

## S4 method for signature 'UserSession'
autogating.list_autogating_analyses_of_type(
  UserSession,
  experiment_id,
  analysis_type,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.show_autogating_analysis_details(
  UserSession,
  experiment_id,
  analysis_id,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.create_autogating_analysis(
  UserSession,
  experiment_id,
  analysis_type,
  name,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.update_autogating_training_analysis_details(
  UserSession,
  experiment_id,
  analysis_id,
  createBlindTestExperiment,
  desiredEventsPerFile,
  desiredTotalEvents,
  eventSamplingMethod,
  fcsFileIds,
  gateSetIds,
  learningMagnification,
  optimalClusters,
  randomSeed,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.update_autogating_inference_analysis_details(
  UserSession,
  experiment_id,
  analysis_id,
  cloneGatesFromParent,
  fcsFileIds,
  trainedModelAnalysisId,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.delete_autogating_analysis(
  UserSession,
  experiment_id,
  analysis_id,
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.copy_autogating_analysis_settings(
  UserSession,
  experiment_id,
  analysis_id,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.rename_autogating_analysis(
  UserSession,
  experiment_id,
  analysis_id,
  name,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.run_autogating_analysis(
  UserSession,
  experiment_id,
  analysis_id,
  output = "default",
  timeout = UserSession@long_timeout
)

## S4 method for signature 'UserSession'
autogating.show_autogating_analysis_status(
  UserSession,
  experiment_id,
  analysis_id,
  output = "default",
  timeout = UserSession@long_timeout
)

Arguments

UserSession

Cytobank UserSession object

experiment_id

integer representing an experiment ID

analysis_type

character representing the type of ananlysis: auto_gate_train or auto_gate_inference

output

character representing the output format [optional]
- drop.upload : ("default", "raw")
- dataframe: converts the file internal compensation matrix output to a dataframe

timeout

integer representing the request timeout time in seconds [optional]

analysis_id

integer representing the id of an autogating analysis

name

character representing the name of an autogating analysis

createBlindTestExperiment

boolean A child experiment will be automatically created, containing the subset of FCS files that were assigned to the blind test set. For every predicted population, the files now contain one additional parameter following the naming convention of auto_gate_Population name.

desiredEventsPerFile

integer Only applies if eventSamplingMethod is set to equal. Defaults to 50,000. It is the number of desired events to sample per file, but if the selected population for any selected file has less total events than the specified number, that quantity will be used instead.

desiredTotalEvents

integer Only applies if eventSamplingMethod is set to proportional. Defaults to 5,000,000. Represents the total desired number of events to sample amongst all selected files, whilst keeping the numbers per file proportional to the total number of events in the selected population for that file. If any file has less events in the selected population than possible to make a perfectly proportional sampling to add up to the desired total, all of the events in the file will be used instead.

eventSamplingMethod

character Valid options are proportional, equal, or all. Defaults to equal. If eventSamplingMethod is set to all, all events for the selected population from all selected files will be used, without any further subsampling.

fcsFileIds

vector/list representing the id list of FCS files

gateSetIds

vector/list representing the id list of Cytobank gate set

learningMagnification

integer By increasing the magnification, the user can determine how many different models are being trained using different parameters on the same training data. The model with the highest KPI will be returned to the user. With a magnification greater than 1, you may be able to influence the model selection to return a model performing better on your population of interest, but usually not significant. Of note, increasing the magnification also causes a proportional increase of the runtime. It may also cause the run to crash due to memory constraints if there are millions of events.

optimalClusters

integer The best estimate of the number of distinct groups of files amongst those selected. Usually, this aligns with how you would sample tag your files into different conditions or time points. It helps the algorithm pick representative samples and perform better. There is an option to create an experiment with blind test files and their inferred populations. It can make it easier to visually evaluate model performance.

randomSeed

integer Accepts a positive integer value and sets a specific random seed to that value. If this parameter is not specified or set to 0, autoSeed will automatically be set to true, and a seed value will be randomly chosen, so that afterward it can be referred to for reproducing the analysis results.

cloneGatesFromParent

boolean The created child experiment will contain a copy of all gates & populations already present in the parent experiment

trainedModelAnalysisId

character The ID of the Autogate Training analysis that contains the model that the inference run will use.

Details

autogating.list_autogating_analyses_of_type

autogating.show_autogating_analysis_details

autogating.create_autogating_analysis Create a new automatic gating analysis of the specified type (auto_gate_train or auto_gate_inference).

autogating.update_autogating_training_analysis_details

autogating.update_autogating_inference_analysis_details

autogating.delete_autogating_analysis

autogating.copy_autogating_analysis_settings

autogating.rename_autogating_analysis

autogating.run_autogating_analysis

autogating.show_autogating_analysis_status

Examples

## Not run: 
# Create train analysis
autogating_train_analysis <- autogating.list_autogating_analyses_of_type(cyto_session,
                             p_experiment_id,
                             "auto_gate_train")
# Update train settings
autogating.update_autogating_training_analysis_details(cyto_session, p_experiment_id,
                    autogating_train_analysis$id,
                    FALSE, 39139, 100001, "proportional",
                    c(114386,114373,114383,114374,114384,114387,114385,114377,114382,114375),
                    c(4,3,1,11,10), 1, 2, 1)
# Run analysis
autogating.run_autogating_analysis(cyto_session, p_experiment_id, autogating_train_analysis$id)
# Create inference analysis
autogating_inference_analysis <- autogating.list_autogating_analyses_of_type(cyto_session,
                                            p_experiment_id,
                                            "auto_gate_inference")
# Update inference settings
autogating.update_autogating_inference_analysis_details(cyto_session, p_experiment_id,
                                    autogating_inference_analysis$id, FALSE,
                                    c(114376,114378,114379,114380,114381,114388,114389,114390),
                                    autogating_train_analysis$id)
# Run analysis
autogating.run_autogating_analysis(cyto_session, p_experiment_id,
                                   autogating_inference_analysis$id)

## End(Not run)
## Not run: autogating.list_autogating_analyses_of_type(cyto_session, 22, "auto_gate_train")

## Not run: autogating.show_autogating_analysis_details(cyto_session, 22, 10)

## Not run: autogating.create_autogating_analysis(cyto_session, 22, "auto_gate_train",
                                                        "My auto gating train analysis")

## End(Not run)
## Not run: autogating.update_autogating_training_analysis_details(
                                         cyto_session, 22, 10, FALSE, 5000, 100000,
                                         "proportional",
                                         c(10, 11, 12, 13, 14, 15, 16, 17, 18, 19),
                                         c(3, 4), 1, 2, NULL)

## End(Not run)
## Not run: autogating.update_autogating_inference_analysis_details(
                                      cyto_session, 22, 10, FALSE, c(21, 22, 23), 10)

## End(Not run)
## Not run: autogating.delete_autogating_analysis(cyto_session, 22, 10)

## Not run: autogating.copy_autogating_analysis_settings(cyto_session, 22, 10)

## Not run: autogating.rename_autogating_analysis(cyto_session, 22, 10, "New new of analysis")

## Not run: autogating.run_autogating_analysis(cyto_session, 22, 10)

## Not run: autogating.show_autogating_analysis_status(cyto_session, 22, 10)


CytobankAPI documentation built on April 21, 2023, 9:08 a.m.