Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
error reading Yeast GO Annotations using goannotread

Subject: error reading Yeast GO Annotations using goannotread

From: Lucas Carey

Date: 26 Jun, 2011 08:20:05

Message: 1 of 4

Hi,
I'm trying to read in the yeast GO term annotations using goannotread. I've followed the directions in the help file:
download :

http://cvsweb.geneontology.org/cgi-bin/cvsweb.cgi/go/gene-associations/gene_association.sgd.gz?rev=HEAD

unzip

when reading the file I get the following error:

YeastGOTermsFile = [fpath '/Data/Gene/Description/Yeast/Sgd/gene_association.sgd' ] Annotation = goannotread(YeastGOTermsFile)


??? Subscripted assignment dimension mismatch.

Error in ==> goannotread at 181
    d(:,goidFieldNum) = num2cell(str2num(goids(:,4:10))); %#ok
 
Has anyone worked with this function?
thanks for any help /suggestions
-Lucas

Matlab 7.11.0.584 R2010b
OSX maci64

Subject: error reading Yeast GO Annotations using goannotread

From: Lucio Cetto

Date: 27 Jun, 2011 14:01:20

Message: 2 of 4

It appears that GO consortium recently changed he format of the SGD files to GAF 2.0. Bioinformatics Toolbox goannotread is only capable of reading GAF 1.0. However I advise to use BioIndexedFile instead, e.g.

>> sourcefile = 'gene_association.sgd';
>> gene2go = BioIndexedFile('mrtab',sourcefile,'.','KeyColumn',3,'HeaderPrefix','!');
>> gene2go.Interpreter = @(x) regexp(x,'GO:\d+','match');
>> read(gene2go,'YAT2')

ans =

  Columns 1 through 6

    'GO:0008415' 'GO:0009437' 'GO:0004092' 'GO:0005737' 'GO:0006066' 'GO:0006810'

  Columns 7 through 12

    'GO:0006631' 'GO:0006629' 'GO:0005737' 'GO:0005737' 'GO:0004092' 'GO:0006066'

  Columns 13 through 15

    'GO:0016740' 'GO:0005829' 'GO:0008415'

HTH
Lucio


"Lucas Carey" <lucas.carey@gmail.com> wrote in message <iu6q3l$bqi$1@newscl01ah.mathworks.com>...
> Hi,
> I'm trying to read in the yeast GO term annotations using goannotread. I've followed the directions in the help file:
> download :
>
> http://cvsweb.geneontology.org/cgi-bin/cvsweb.cgi/go/gene-associations/gene_association.sgd.gz?rev=HEAD
>
> unzip
>
> when reading the file I get the following error:
>
> YeastGOTermsFile = [fpath '/Data/Gene/Description/Yeast/Sgd/gene_association.sgd' ] Annotation = goannotread(YeastGOTermsFile)
>
>
> ??? Subscripted assignment dimension mismatch.
>
> Error in ==> goannotread at 181
> d(:,goidFieldNum) = num2cell(str2num(goids(:,4:10))); %#ok
>
> Has anyone worked with this function?
> thanks for any help /suggestions
> -Lucas
>
> Matlab 7.11.0.584 R2010b
> OSX maci64

Subject: error reading Yeast GO Annotations using goannotread

From: Susanne

Date: 2 May, 2012 13:43:06

Message: 3 of 4

Dear Lucio,
thanks for your helpful answer (even if the original question came from someone else).
I had the same problem when trying to follow the matlab example and came across your answer via google.
I now tried your suggestion but I am directly confronted with another problem, I can not understand. Your example works quite well, but I do not want to use the entries in Column Nr. 3 as Key-entries but the SGD-IDs in column nr. 2 (I thought this would be very easy (following your example) just to change your second code line to:
>
>>gene2goObj = BioIndexedFile('mrtab', sourcefile, '.','KeyColumn', 2, 'HeaderPrefix','!')
and then search for
>> read(gene2go,'S000000826')

instead of searching for 'YAT2'

However, I always receive the following error message :

Error using containers.Map/subsref
The specified key is not present in this container.

Error in BioIndexedFile/getIndexByKey (line 920)
                    idx(i) = obj.Keys(key{i});

Error in BioIndexedFile/getEntryByKey (line 972)
            idx = getIndexByKey(obj,key);

Error in BioIndexedFile/read (line 1007)
                str = getEntryByKey(obj,s);


I also tried other columns as "key column" but It seems,the key is still set in the 3-rd column.
When I use the matlab function
>> keys = getKeys(gene2goObj);
then - no matter which column I define when contructing the object - the entries are always those from the 3rd column (even after "clear all" and restarting of the system).
Could someone please help me in finding the hopefully very easy answer,
thanks a lot,
best regards,
Susanne
 




"Lucio Cetto" wrote in message <iua2fg$okl$1@newscl01ah.mathworks.com>...
> It appears that GO consortium recently changed he format of the SGD files to GAF 2.0. Bioinformatics Toolbox goannotread is only capable of reading GAF 1.0. However I advise to use BioIndexedFile instead, e.g.
>
> >> sourcefile = 'gene_association.sgd';
> >> gene2go = BioIndexedFile('mrtab',sourcefile,'.','KeyColumn',3,'HeaderPrefix','!');
> >> gene2go.Interpreter = @(x) regexp(x,'GO:\d+','match');
> >> read(gene2go,'YAT2')
>
> ans =
>
> Columns 1 through 6
>
> 'GO:0008415' 'GO:0009437' 'GO:0004092' 'GO:0005737' 'GO:0006066' 'GO:0006810'
>
> Columns 7 through 12
>
> 'GO:0006631' 'GO:0006629' 'GO:0005737' 'GO:0005737' 'GO:0004092' 'GO:0006066'
>
> Columns 13 through 15
>
> 'GO:0016740' 'GO:0005829' 'GO:0008415'
>
> HTH
> Lucio
>
>
> "Lucas Carey" <lucas.carey@gmail.com> wrote in message <iu6q3l$bqi$1@newscl01ah.mathworks.com>...
> > Hi,
> > I'm trying to read in the yeast GO term annotations using goannotread. I've followed the directions in the help file:
> > download :
> >
> > http://cvsweb.geneontology.org/cgi-bin/cvsweb.cgi/go/gene-associations/gene_association.sgd.gz?rev=HEAD
> >
> > unzip
> >
> > when reading the file I get the following error:
> >
> > YeastGOTermsFile = [fpath '/Data/Gene/Description/Yeast/Sgd/gene_association.sgd' ] Annotation = goannotread(YeastGOTermsFile)
> >
> >
> > ??? Subscripted assignment dimension mismatch.
> >
> > Error in ==> goannotread at 181
> > d(:,goidFieldNum) = num2cell(str2num(goids(:,4:10))); %#ok
> >
> > Has anyone worked with this function?
> > thanks for any help /suggestions
> > -Lucas
> >
> > Matlab 7.11.0.584 R2010b
> > OSX maci64

Subject: error reading Yeast GO Annotations using goannotread

From: Lucio Cetto

Date: 3 May, 2012 14:21:07

Message: 4 of 4

Removing the old index file should solve the problem.
HTH
Lucio

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us