Katsevich-Lab / sceptre

An R package for single-cell CRISPR screen data analysis emphasizing statistical rigor, massive scalability, and ease of use.
https://katsevich-lab.github.io/sceptre/
GNU General Public License v3.0
26 stars 8 forks source link

No negative control pair passes pairwise QC. #154

Closed AAAAAbetter closed 1 month ago

AAAAAbetter commented 1 month ago

Your package has been extremely helpful!

However, when running the code, I encountered the following error:
"Constructing negative control pairs.
Error in construct_negative_control_pairs_v2(sceptre_object = sceptre_object, :
No negative control pair passes pairwise QC."

My original code is as follows:

sceptre_object <- import_data_from_cellranger(
  directories = directories,
  moi = "high",
  grna_target_data_frame=grna_target_data_frame_highmoi
)

positive_control_pairs <- construct_positive_control_pairs(sceptre_object)

discovery_pairs<- construct_trans_pairs(
  sceptre_object = sceptre_object,
  positive_control_pairs = positive_control_pairs,
  pairs_to_exclude = "pairs_containing_pc_targets"
)

sceptre_object <- sceptre_object |>
  set_analysis_parameters(
    discovery_pairs = discovery_pairs,
    positive_control_pairs = positive_control_pairs,
    side = "left",
    grna_integration_strategy = "singleton",
    multiple_testing_alpha = 0.2
  ) |>
  assign_grnas(parallel = T,n_processors=2) |>
  run_qc(p_mito_threshold = 0.075) |>
  run_calibration_check(parallel = T, n_processors=2) |>
  run_power_check(parallel = T,n_processors=2) |>
  run_discovery_analysis(parallel = T, n_processors=2)

After adjusting grna_integration_strategy = "singleton" to the default option, the code runs without issues. Could you please explain the potential reasons for this error? What adjustments can be made during the experiment and sequencing to avoid this error?