This is a test version of Biostars. For the public version, visit https://www.biostars.org.
FraserDataSet() error in FRASER

Hello, I'm trying to use FRASER package for splicing events. So far, I created these files;

data_dir <- "/home/user/rnaseq/data" junctions <- fread(file.path(data_dir, "junction_counts.tsv"), header=TRUE) splicesite <- fread(file.path(data_dir, "splicesite_counts.tsv"), header=TRUE) coldata <- fread(file.path(data_dir, "exp_design_fraser.tsv"), header=TRUE)

> head(junctions)
     seqnames  start    end width strand startID  endID 3618-A 3618-B 3619-A
       <char>  <int>  <int> <int> <char>   <int>  <int>  <int>  <int>  <int>
1: GL000009.2  56679  83041 26362      -  233135 242663      0      0      1
2: GL000194.1 112851 114985  2134      -  233137 242664      0     12     16
3: GL000194.1 156538 163935  7397      +  233138 242665      0      0      2
4: GL000194.1  49195  55487  6292      +  233139 242670      0      0      0
5: GL000194.1  52037  55487  3450      +  233140 242670      0      0      0
6: GL000194.1  53863  54677   814      -  233141 242666      0      0      0
   3619-B 3620-A 3620-B
    <int>  <int>  <int>
1:      0      0      0
2:     10     51     24
3:      0      0      0
4:      0      5      0
5:      0      5      0
6:      0      0      3

> head(splicesite)
   seqnames start   end width strand spliceSiteID     type 3618-A 3618-B 3619-A
     <char> <int> <int> <int> <char>        <int>   <char>  <int>  <int>  <int>
1:     chr1 12722 13482     1      +            1 Acceptor      0      0      0
2:     chr1 14615 16857     2      +            2    Donor      0      0      0
3:     chr1 14738 14969     2      +            3    Donor      0      0      0
4:     chr1 14788 16875     2      +            4    Donor      0      0      0
5:     chr1 14830 14929     2      +            5    Donor      0      0      0
6:     chr1 14830 14969     2      +            6    Donor      0      0      0
   3619-B 3620-A 3620-B
    <int>  <int>  <int>
1:      0      0      0
2:      0      0      0
3:      0      0      0
4:      0      0      0
5:      0      0      0
6:      0      0      0

and I checked the files;

> dim(junctions)
[1] 339402     13
> dim(splicesite)
[1] 1111024      13

When I tried creating FRASER object, an error occured:

fds <- FraserDataSet(
    workingDir = data_dir,
    junctions = junctions,
    spliceSites = splicesite,
    colData = coldata
)

Error in SummarizedExperiment(rowRanges = junctions[, c("startID", "endID")],  :
  the rownames and colnames of the supplied assay(s) must be NULL or
  identical to those of the RangedSummarizedExperiment object (or
  derivative) to construct

How to solve it? Thank you.

r splicing fraser rnaseq alternative

Hi, the solution still seems to suggest the same error. Since the rownames of junctions need to be derived from "startID" and "endID" so that they match the rowRanges required by Fraser, you have two options:

1) Remove the rownames from both:

rownames(junctions) <- NULL
rownames(splicesite) <- NULL

2) Standardize the rownames so that they match those expected:

rownames(junctions) <- paste0("junc_", junctions$startID, "_", junctions$endID)
rownames(splicesite) <- paste0("site_", splicesite$spliceSiteID)

I don't know which one is the best solution; try them separately and see if it creates the FRASER object.

Let me know,

Regards,

Marco

Thank you for reply. When I run the first option, nothing's changed, same error occured. However, in second option this error occured;

> rownames(splicesite) <- paste0("site_", splicesite$spliceSiteID)

Error in `.rowNamesDF<-`(x, value = value) :
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': ‘site_1’, ‘site_10’, ‘site_100’, ‘site_1000’, ‘site_10000’, ‘site_100000’, ‘site_100001’, ‘site_100002’, ‘site_100003’, ‘site_100004’, ‘site_100005’, ‘site_100006’, ‘site_100007’, ‘site_100008’, ‘site_100009’, ‘site_10001’, ‘site_100010’, ‘site_100011’, ‘site_100012’, ‘site_100013’, ‘site_100014’, ‘site_100015’, ‘site_100016’, ‘site_100017’, ‘site_100018’, ‘site_100019’, ‘site_10002’, ‘site_100020’, ‘site_100021’, ‘site_100022’, ‘site_100023’, ‘site_100024’, ‘site_100025’, ‘site_100026’, ‘site_100027’, ‘site_100028’, ‘site_100029’, ‘site_10003’, ‘site_100030’, ‘site_100031’, ‘site_100032’, ‘site_100033’, ‘site_100034’, ‘site_100035’, ‘site_100036’, ‘site_100037’, ‘site_100038’, ‘site_100039’, ‘site_10004’, ‘site_100040’, ‘site_100041’, ‘sit [... truncated]`enter code here`

Not having full insight into the structure of a FRASER object, I wrote the code I thought might work. You can try making the rownames unique:

rownames(splicesite) <- make.unique(paste0("site_", splicesite$spliceSiteID))

Thanks but still encounter the same problem;

>     fds <- FraserDataSet(
    workingDir = data_dir,
    junctions = junctions,
    spliceSites = splicesite,
    colData = coldata
)

Error in SummarizedExperiment(rowRanges = junctions[, c("startID", "endID")], : the rownames and colnames of the supplied assay(s) must be NULL or identical to those of the RangedSummarizedExperiment object (or derivative) to construct

Can you show the colData data? It’s important that colData$sampleID is identical to rownames(colData) and to the sample names in junctions and spliceSites.

It looks like that;

sampleID        condition       batch   bamFile
3618-A  control batch1  RP24-190-3618-A_S639_L002_2pass_Aligned.sortedByCoord.out.bam
3618-B  control batch1  RP24-190-3618-B_S640_L002_2pass_Aligned.sortedByCoord.out.bam
3619-A  control batch1  RP24-190-3619-A_S641_L002_2pass_Aligned.sortedByCoord.out.bam
3619-B  control batch1  RP24-190-3619-B_S642_L002_2pass_Aligned.sortedByCoord.out.bam
3620-A  test    batch1  RP24-190-3620-A_S643_L002_2pass_Aligned.sortedByCoord.out.bam
3620-B  test    batch1  RP24-190-3620-B_S644_L002_2pass_Aligned.sortedByCoord.out.bam`

0 answers

No answers yet.

Log in to answer this question.