Error in h(simpleError(msg, call)) isoformSwitchAnalysisPart1

163 views
Skip to first unread message

lu lu

unread,
Mar 9, 2023, 9:45:05 PM3/9/23
to IsoformSwitchAnalyzeR
Hi,

I got an error:

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'which': 'list' object cannot be coerced to type 'double' In addition: There were 18 warnings (use warnings() to see them)

My script is:

```{r}
salmonQuant <- importIsoformExpression(parentDir="salmonoutput", pattern="quant.sf")
```

```{r}
myDesign <- data.frame(
    sampleID = colnames(salmonQuant$abundance)[-1],
    condition = c('FXS','FXS','Control','Control','FXS','FXS','FXS','FXS','Control','Control','Control','Control','Control')
)
```

```{r}
aSwitchList <- importRdata(
    isoformCountMatrix   = salmonQuant$counts,
    isoformRepExpression = salmonQuant$abundance,
    designMatrix         = myDesign,
    isoformExonAnnoation="D:/experiment/data analysis/reference genome/gencode/gencode.v42.annotation.gtf.gz", isoformNtFasta="D:/experiment/data analysis/reference genome/gencode/gencode.v42.transcripts.fa.gz",
   fixStringTieAnnotationProblem = TRUE,
    showProgress = FALSE)
```

```{r}
exampleSwitchList <- isoformSwitchAnalysisPart1(
    switchAnalyzeRlist   = aSwitchList,
    outputSequences      = TRUE,
    prepareForWebServers = TRUE
)
```



Could you please help me?

Best,

Lu

Kristoffer Vitting-Seerup

unread,
Mar 10, 2023, 8:37:30 AM3/10/23
to IsoformSwitchAnalyzeR
Hi Lu

Which part of the script gives the error problem?

Also did you solve the other problem you posted about?

lu lu

unread,
Mar 10, 2023, 11:01:45 PM3/10/23
to IsoformSwitchAnalyzeR
Hi, it's this part:

```{r}
exampleSwitchList <- isoformSwitchAnalysisPart1(
    switchAnalyzeRlist   = aSwitchList,
    outputSequences      = TRUE,
    prepareForWebServers = TRUE
)
```

I haven't fixed any and had more new problems. so I totally have 13 samples, according to your manual, it is better to run step by step and use isoformSwitchTestSatuRn. so here are my recent script:

```{r}
salmonQuant <- importIsoformExpression(parentDir="salmonoutput", pattern="quant.sf")

myDesign <- data.frame(
    sampleID = colnames(salmonQuant$abundance)[-1],
    condition = c('FXS','FXS','Control','Control','FXS','FXS','FXS','FXS','Control','Control','Control','Control','Control')
)

aSwitchList <- importRdata(
    isoformCountMatrix   = salmonQuant$counts,
    isoformRepExpression = salmonQuant$abundance,
    designMatrix         = myDesign,
    isoformExonAnnoation="D:/experiment/data analysis/reference genome/gencode/gencode.v42.annotation.gtf.gz", isoformNtFasta="D:/experiment/data analysis/reference genome/gencode/gencode.v42.transcripts.fa.gz",
   fixStringTieAnnotationProblem = TRUE,
    showProgress = FALSE)

aslist <- preFilter(
    switchAnalyzeRlist = aSwitchList,
    geneExpressionCutoff = 4)
```

```{r}
aslist1 <- isoformSwitchTestSatuRn(
    switchAnalyzeRlist = aslist,
    reduceToSwitchingGenes=TRUE)
```


But when I ran the last part (red highlighted), I got the error:

Step 1 of 4: Creating SummarizedExperiment data object... Step 2 of 4: Fitting linear models... |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02m 46s Step 3 of 4: Testing pairwise comparison(s)... Step 4 of 4: Preparing output... Result added switchAnalyzeRlist Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'which': 'list' object cannot be coerced to type 'double' In addition: There were 17 warnings (use warnings() to see them)

lu lu

unread,
Mar 13, 2023, 2:31:53 PM3/13/23
to IsoformSwitchAnalyzeR
Hi, 

Could you please help me?

Lu

On Friday, March 10, 2023 at 8:37:30 AM UTC-5 k.vittin...@gmail.com wrote:

Kristoffer Vitting-Seerup

unread,
Mar 14, 2023, 6:27:20 AM3/14/23
to IsoformSwitchAnalyzeR
Could you post the output when you run importRdata()?

Also could you post the first couple or lines from your design:
head( aSwitchList$designMatrix )

(feel free to modify group names to anonymize the data - I just need to see the structure)

lu lu

unread,
Mar 14, 2023, 2:27:26 PM3/14/23
to IsoformSwitchAnalyzeR
Hi, 

The first couple lines:

```{r}
setwd("D:/experiment/data analysis/fxs project/FXS btach2 glu 13 samples 202206/DTU")

salmonQuant <- importIsoformExpression(parentDir="salmonoutput", pattern="quant.sf")
myDesign <- data.frame(
    sampleID = colnames(salmonQuant$abundance)[-1],
    condition = c('FXS','FXS','Control','Control','FXS','FXS','FXS','FXS','Control','Control','Control','Control','Control')
)
```

The head(aSwitchList$designMatrix):
groups.png

The output after running importRdata():
importdata.png

Kristoffer Vitting-Seerup

unread,
Mar 15, 2023, 1:10:02 AM3/15/23
to IsoformSwitchAnalyzeR
Hmm, this is really strange, but unfortunately, very hard to debug without being able to re-create the error locally.

Would you be willing to share your data with me? I'd naturally keep it confidential and delete it as soon as I was done with debugging. If so, you can save the "aSwitchList" using the save() function and email me the object.

Kristoffer Vitting-Seerup

unread,
Mar 17, 2023, 9:26:07 AM3/17/23
to IsoformSwitchAnalyzeR
This has been fixed in IsoformSwitchAnalyzeR v 2.1.10 which you can get from github.

Kristoffer Vitting-Seerup

unread,
Mar 17, 2023, 9:26:25 AM3/17/23
to IsoformSwitchAnalyzeR
Thanks for sharing your data Lu! :-)
Reply all
Reply to author
Forward
0 new messages