hyunhwan-jeong / CB2

CB2 is an R package which provides functions for hit gene identification and quantification of sgRNA (single-guided RNA) abundances for CRISPR (Clustered Regularly Interspaced Short Palindromic Repeats) pooled screen data analysis. Details are in Jeong et al. (2019) <doi:10.1101/gr.245571.118> and Baggerly et al. (2003) <doi:10.1093/bioinformatics/btg173>.

Home Page:https://cran.r-project.org/web/packages/CB2/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run_sgrna_quant fails

AMChalkie opened this issue · comments

Hi,

I see the following error:

Error in data.frame(sgRNA = quant_ret$sgRNA, sequence = quant_ret$sequence) :
arguments imply differing number of rows: 79633, 79637

traceback()
3: stop(gettextf("arguments imply differing number of rows: %s",
paste(unique(nrows), collapse = ", ")), domain = NA)
2: data.frame(sgRNA = quant_ret$sgRNA, sequence = quant_ret$sequence)
1: run_sgrna_quant(LIBRARY_FASTA, df_design)

Suggest adding a more robust check in the output section.
Cheers
Alistair

When running
run_sgrna_quant(FASTA, df_design, sg2gene)
I see this comment: 4 sgRNA sequences were repetitive and will be discarded.

Final Mappability: 88.2023%
Parsed with column specification:
cols(
PZP_1 = col_character(),
PZP = col_character()
)
Error: by can't contain join column id which is missing from LHS
Run rlang::last_error() to see where the error occurred.

rlang::last_error()
<error/rlang_error>
by can't contain join column id which is missing from LHS
Backtrace:

  1. CB2::run_sgrna_quant(...)
  2. dplyr:::left_join.tbl_df(df_map, df_count, by = "id")
  3. dplyr:::common_by.character(by, x, y)
  4. dplyr:::common_by.list(by, x, y)
  5. dplyr:::bad_args(...)
  6. dplyr:::glubort(fmt_args(args), ..., .envir = .envir)
    Run rlang::last_trace() to see the full context.

When running: (with duplicates)
run_sgrna_quant(FASTA, df_design)

run_sgrna_quant(FASTA, df_design)

I get
Error in data.frame(sgRNA = quant_ret$sgRNA, sequence = quant_ret$sequence) :
arguments imply differing number of rows: 79633, 79637

traceback()
3: stop(gettextf("arguments imply differing number of rows: %s",
paste(unique(nrows), collapse = ", ")), domain = NA)
2: data.frame(sgRNA = quant_ret$sgRNA, sequence = quant_ret$sequence)
1: run_sgrna_quant(LIBRARY_FASTA, df_design)