FredHutch / gimap

Genetic Interaction MAPping for dual target CRISPR screens
https://fredhutch.github.io/gimap/
0 stars 0 forks source link

`setup_data()` is still not working #28

Closed howardbaik closed 4 months ago

howardbaik commented 4 months ago

@kweav @cansavvy

After https://github.com/FredHutch/gimap/pull/27 was merged, I was hoping to run the example code for setup_data(). I ran the code to fetch/setup the example data and assign it to example_counts. Then, I ran setup_data(counts = example_counts) and now encounter a different error message:

> gimap_dataset <- setup_data(counts = example_counts)
Error in setup_data(counts = example_counts) : 
  the number of rows in the pg_info is not equal to the number of rows in the counts
kweav commented 4 months ago

We must have just switched an ncol and an nrow at some point, but hopefully PR #29 addresses this and fixes it

howardbaik commented 4 months ago

PR https://github.com/FredHutch/gimap/pull/29 fixed the above error message, but now we have another error:

> gimap_dataset <- setup_data(counts = example_counts)
Error in if (!(nrow(unique(pg_ids[, 1])) == nrow(pg_ids[, 1]))) stop("The paired guide IDs must be a unique ID") : 
  argument is of length zero
kweav commented 4 months ago

30 addresses this new problem I think. nrow is returning NULLs. Switched them for length functions instead