[BioC] Dexseq package: looking for help with function -- newExonCountSet()
Alejandro Reyes
alejandro.reyes at embl.de
Fri Nov 22 11:23:32 CET 2013
Hi Capricy,
I think the parameters geneID and exonID that you are providing to the
function newExonCountSet are not the right class, these seem to be data
frames and they must be character vectors. So, for example, you should
do this:
exonIDs = read.table( "exonCountsGenomemodel.exonID",
stringsAsFactors=FALSE, header=FALSE )$V1
instead of all these:
exonIDs=read.table("exonCountsGenomemodel.exonID")
rownames(exonIDs)=rownames(data)
Best regards,
Alejandro
> I have exon count table, gene ID and exon ID in separate files and
> read them into R. When I tried to use the newExonCountSet() to
> generate the ecs object, I got an error: length of 'dimnames' [1] not
> equal to array extent
>
> Could any body help me to fix this problem? Thanks.
>
> Here are my codes and some outputs:
> ------------
> >data=read.table("male-exonCountsGenomemodel.3.csv", header=T,
> sep="\t", row.names=1)
> >head(data)
> MA MA.1 MM MM.1 MP MP.1 MW MW.1
> CUFF.10002:001 0 0 0 0 0 0 0 0
> CUFF.10002:002 0 0 0 0 9 10 3 0
> CUFF.10004:001 0 0 0 0 0 0 0 0
> CUFF.10004:002 2 1 0 0 2 0 2 0
> CUFF.10004:003 1 0 0 0 1 0 0 0
> CUFF.10004:004 3 2 0 0 2 0 4 0
> >geneIDs=read.table("exonCountsGenomemodel.geneID.1")
> >rownames(geneIDs)=rownames(data)
> >head(geneIDs)
> V1
> CUFF.10002:001 CUFF.10002
> CUFF.10002:002 CUFF.10002
> CUFF.10004:001 CUFF.10004
> CUFF.10004:002 CUFF.10004
> CUFF.10004:003 CUFF.10004
> CUFF.10004:004 CUFF.10004
>
> >exonIDs=read.table("exonCountsGenomemodel.exonID")
> >rownames(exonIDs)=rownames(data)
> >head(exonIDs)
> V1
> CUFF.10002:001 E001
> CUFF.10002:002 E002
> CUFF.10004:001 E001
> CUFF.10004:002 E002
> CUFF.10004:003 E003
> CUFF.10004:004 E004
>
> > dim(exonIDs)
> [1] 151944 1
> > dim(geneIDs)
> [1] 151944 1
> > dim(data)
> [1] 151944 8
>
> > design.m
> countFile condition
> MA ../ATCACG/genome_mapping/tophat_out/accepted_hits.exonCounts MA
> MA.1 ../GATCAG/genome_mapping/tophat_out/accepted_hits.exonCounts MA
> MM ../CGATGT/genome_mapping/tophat_out/accepted_hits.exonCounts MM
> MM.1 ../TAGCTT/genome_mapping/tophat_out/accepted_hits.exonCounts MM
> MP ../ACAGTG/genome_mapping/tophat_out/accepted_hits.exonCounts MP
> MP.1 ../TTAGGC/genome_mapping/tophat_out/accepted_hits.exonCounts MP
>
> > ecs.tmp=newExonCountSet(countData = data[, 1:6],
> design=design.m,geneIDs=geneIDs, exonIDs=exonIDs)
> Error: length of 'dimnames' [1] not equal to array extent
>
> -----------
>
>
More information about the Bioconductor
mailing list