Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poolRuns() error, invalid 'row.names' length #130

Open
jppmatos opened this issue Sep 5, 2024 · 0 comments
Open

poolRuns() error, invalid 'row.names' length #130

jppmatos opened this issue Sep 5, 2024 · 0 comments

Comments

@jppmatos
Copy link

jppmatos commented Sep 5, 2024

Hello to all,

I'm having some problems with poolRuns() by having the error:

> QRC <- poolRuns(QRC, samples=samples, force=TRUE)
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length

Gave a look at the function and I suspect is related to the following lines:

QDNAseq/R/poolRuns.R

Lines 106 to 108 in c07ae77

metadata <- varMetadata(object)
metadata <- rbind(metadata, structure(data.frame(labelDescription = NA_character_), rownames = "total.reads"))
newphenodata <- AnnotatedDataFrame(newphenodata, varMetadata=metadata)

I also messed around with poolRuns and noticed the possible extra column at the metadata variable at line 107:

    metadata <- varMetadata(object)
    metadata <- rbind(metadata, structure(data.frame(labelDescription = NA_character_), rownames = "total.reads"))

    print("BUG?")
    print(metadata)

    newphenodata <- AnnotatedDataFrame(newphenodata, varMetadata=metadata)
> source('poolRuns.R')

> QRC <- poolRuns(QRC, samples=samples, force=TRUE)

[1] " BUG? "
                  labelDescription
name                          <NA>
total.reads                   <NA>
used.reads                    <NA>
expected.variance             <NA>
1                             <NA>
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length
> 

Here's the traceback():

> traceback()
9: stop("invalid 'row.names' length")
8: `.rowNamesDF<-`(x, value = value)
7: `row.names<-.data.frame`(`*tmp*`, value = c("name", "total.reads",
   "used.reads", "expected.variance"))
6: `row.names<-`(`*tmp*`, value = c("name", "total.reads", "used.reads",
   "expected.variance"))
5: .local(data, varMetadata, ...)
4: AnnotatedDataFrame(newphenodata, varMetadata = metadata)
3: AnnotatedDataFrame(newphenodata, varMetadata = metadata) at poolRuns.R#119
2: poolRuns(QRC, samples = samples, force = TRUE)
1: poolRuns(QRC, samples = samples, force = TRUE)

Might be naïve, but is the 'extra' column (1) in the metadata variable excessive?

If there is anything else I could do, please let me know.

QDNAseq version: 1.41.2

Thank you for your time,
Zé Pedro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant