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>.
https://cran.r-project.org/web/packages/CB2/index.html
Other
7 stars 1 forks source link

Error in cb2_count() #16

Open hjoshi-nyscf opened 1 year ago

hjoshi-nyscf commented 1 year ago

Hi, I am trying CB2 analysis in R to analyze my CRISPR data. The package is installed properly (I guess) and example data runs fine. When I am trying my own data, I can load the files correctly. but I am having trouble running the next steps.

Error: cb2_count <- run_sgrna_quant(FASTA, df_design) Error in data.frame(sgRNA = quant_ret$sgRNA, sequence = quant_ret$sequence) : arguments imply differing number of rows: 201322, 202586

Commands (successful)

FASTA <- "/CB2analysis/CRISPRi_v2_human.trim_1_39_forward.fa"

df_design <- tribble(~group, ~sample_name, "Pre","IMEV0023-Pre_R1_001","Post", "IMEV0023-Post_R1_001","C2","IMEV0023-C2-S1_R1_001","C6","IMEV0023-C6-S4_R1_001",) %>% mutate( fastq_path = glue("{ex_path}/{sample_name}.fastq.gz") )

df_design A tibble: 4 × 3 group sample_name fastq_path

1 Pre IMEV0023-Pre_R1_001 /extdata/Screen23i/IMEV0023-Pre_R1_001.f… 2 Post IMEV0023-Post_R1_001 /extdata/Screen23i/IMEV0023-Post_R1_001.… 3 C2 IMEV0023-C2-S1_R1_001 /extdata/Screen23i/IMEV0023-C2-S1_R1_001… 4 C6 IMEV0023-C6-S4_R1_001 /extdata/Screen23i/IMEV0023-C6-S4_R1_001…

I am using Rstudio: 2022.12.0+353 R 4.2.2

If you can point me to right direction of resolving this, that would be highly appreciated. HJ

hyunhwan-jeong commented 1 year ago

Hello @hjoshi-nyscf, can you send your CRISPRi_v2_human.trim_1_39_forward.fa to jeong.compbio@gmail.com?

Thank you,

Hyun-Hwan Jeong

hyunhwan-jeong commented 1 year ago

Hi @hjoshi-nyscf,

Hyun-Hwan Jeong

hyunhwan-jeong commented 1 year ago

@hjoshi-nyscf one of easy workaround is going to be rename the guide name as "genesymbol_guideRNA". Can you try?

Hyun-Hwan Jeong

hyunhwan-jeong commented 1 year ago

@hjoshi-nyscf have you solved the problem?