Roleren / ORFik

MIT License
32 stars 9 forks source link

create.experiment(pairedEndBam = TRUE) error #159

Closed SuhasSrinivasan closed 8 months ago

SuhasSrinivasan commented 8 months ago

Dear Developers,

This issue is likely related #157

In create.experiment(), when pairedEndBam = TRUE, then the following fourth row is NOT created.

"libtype","stage","rep","condition","fraction","filepath"

The values that are observed in Row 4 are

"paired-end","paired-end","paired-end","paired-end","paired-end","paired-end"

colo_riboseq_Ribo-seq.csv

This in turn causes validateExperiment() to fail. There is also the following warning when create.experiment(pairedEndBam = T) #158

Warning message:
In matrix(value, n, p) :
  data length [8] is not a sub-multiple or multiple of the number of columns [7]

TESTED WORKAROUND After calling create.experiment(), CSV files are created. Edit the ORFik_experiments CSV files by changing Row 4 to "libtype","stage","rep","condition","fraction","filepath","paired-end"


Roleren commented 8 months ago

That is a funny bug, for now either manually edit the csvs to fix it. If it is correct, list.experiments should no longer fail.

Will push a fix on Friday :)

SuhasSrinivasan commented 8 months ago

Thank you for reviewing! Yes, the CSV editing helps and the following next steps work

list.experiments()

read.experiment()

ORFikQC()
SuhasSrinivasan commented 8 months ago

Noticed another related issue when trying to create a paired-end experiment with 4 replicates, i.e., total 4 bam files.

Error in `[<-.data.frame`(`*tmp*`, 4, , value = c("paired-end", "paired-end",  : 
  replacement has 4 items, need 7

Workaround for this is to create the experiment as not paired-end, then edit the CSV file to add paired-end column.

Roleren commented 8 months ago

Fixed, in newest github master branch version, test it out, will close this issue.