lpantano / lpantano/bcbioSmallRna
Cannot upload bcbio run
- Dominant language
- HTML
- Stars
- 6
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Trying to load a bcbio run with these commands:
```
path <- "/home/kokyriakidis/Downloads/BCBIO/mirqc_bcbio/final/2020-02-23_mirqc_bcbio"
sbcb <- loadSmallRnaRun(path, "condition")
```
And I get:
```
Error in x[[...]] <- m : replacement has length zero
3.
`[[<-.factor`(`*tmp*`, "sample", value = NULL)
2.
`[[<-`(`*tmp*`, "sample", value = NULL)
1.
loadSmallRnaRun(file.path(path, "final", "2020-02-23_mirqc_bcbio"), "condition")
```
I did some digging in the code. First, this change is necessary I think.
```
match <- str_match(project_dir, project_dir_pattern)
should change to:
match <- str_match(basename(project_dir), project_dir_pattern)
```
The part that breaks the code is this:
```
csv <- read.csv(csv_file, row.names = 1L, check.names = FALSE)
#This line breaks the code# csv <- csv[, apply(!is.na(csv), 2, all)]
if (is.null(colData)) {
col_data <- csv
}
else {
col_data <- as.data.frame(colData)
}
col_data[["sample"]] <- rownames(col_data)
```
Removing this line makes the function work fine. This is happening when there is only one column with info about the samples and after the removal of the other fields, the format is disrupted.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with loadSmallRnaRun and the read.csv and column-filtering code shown in the report. Reproduce the supplied bcbio load command with the sample data, then verify that a single remaining sample-information column is preserved and loading completes without the replacement-length error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100