Maker 2.31.10: maker_functional_gff and maker_functional_fasta not parsing correctly, Can't use string ("") as a HASH ref while "strict refs" in use

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Maker 2.31.10: maker_functional_gff and maker_functional_fasta not parsing correctly, Can't use string ("") as a HASH ref while "strict refs" in use

Christopher Keeling
Hello,

In sub parse_blast{, during parsing of uniprot fasta file:

if (/>(\S+)\s+(.*?)\s+OS=(.*?)\s+(GN=(.*?)\s+)?PE=/) {

should be changed to:

if (/>sp\|(\S+)\|\S+\s+(.*?)\s+OS=(.*?)\s+OX=\S+\s+(GN=(.*?)\s+)?PE=/) {

to avoid "Can't use string ("") as a HASH ref while "strict refs" in use at…" errors.


Cheers,
Chris


--
Christopher I. Keeling

Chercheur scientifique en génomique forestière/ Research Scientist in Forest Genomics


Ressources naturelles Canada / Natural Resources Canada
Service canadien des forêts / Canadian Forest Service
Centre de foresterie des Laurentides / Laurentian Forestry Centre
1055, rue du PEPS Québec, QC G1V 4C7 Canada
https://cfs.nrcan.gc.ca/employees/read/ckeeling

Professeur associé
Département de biochimie, de microbiologie et de bio-informatique
Université Laval
https://www.researchgate.net/profile/Christopher_Keeling
https://scholar.google.ca/citations?user=KtGr86UAAAAJ

 


_______________________________________________
maker-devel mailing list
[hidden email]
http://yandell-lab.org/mailman/listinfo/maker-devel_yandell-lab.org
Reply | Threaded
Open this post in threaded view
|

Re: Maker 2.31.10: maker_functional_gff and maker_functional_fasta not parsing correctly, Can't use string ("") as a HASH ref while "strict refs" in use

Carson Holt-2
Thanks I’ll update the related scripts. In my tests the old regular expression still works, but ends up adding the OX= tag as part of the GFF3 entry and not throwing a hash ref error. So you still may have another issue if you are getting a hash ref error.

—Carson


On Mar 14, 2020, at 11:24 AM, Christopher Keeling <[hidden email]> wrote:

Hello,

In sub parse_blast{, during parsing of uniprot fasta file:

if (/>(\S+)\s+(.*?)\s+OS=(.*?)\s+(GN=(.*?)\s+)?PE=/) {

should be changed to:

if (/>sp\|(\S+)\|\S+\s+(.*?)\s+OS=(.*?)\s+OX=\S+\s+(GN=(.*?)\s+)?PE=/) {

to avoid "Can't use string ("") as a HASH ref while "strict refs" in use at…" errors.


Cheers,
Chris


--
Christopher I. Keeling

Chercheur scientifique en génomique forestière/ Research Scientist in Forest Genomics


Ressources naturelles Canada / Natural Resources Canada
Service canadien des forêts / Canadian Forest Service
Centre de foresterie des Laurentides / Laurentian Forestry Centre
1055, rue du PEPS Québec, QC G1V 4C7 Canada
https://cfs.nrcan.gc.ca/employees/read/ckeeling

Professeur associé
Département de biochimie, de microbiologie et de bio-informatique
Université Laval
https://www.researchgate.net/profile/Christopher_Keeling
https://scholar.google.ca/citations?user=KtGr86UAAAAJ

 

_______________________________________________
maker-devel mailing list
[hidden email]
http://yandell-lab.org/mailman/listinfo/maker-devel_yandell-lab.org


_______________________________________________
maker-devel mailing list
[hidden email]
http://yandell-lab.org/mailman/listinfo/maker-devel_yandell-lab.org
Reply | Threaded
Open this post in threaded view
|

Re: Maker 2.31.10: maker_functional_gff and maker_functional_fasta not parsing correctly, Can't use string ("") as a HASH ref while "strict refs" in use

Christopher Keeling
In reply to this post by Christopher Keeling
Hi Carson,

I’m now using Maker 3.01.03, and I’m finding that maker_functional_gff and maker_functional_fasta still are not behaving as they should. I’m getting an error:

Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/maker/bin/maker_functional_gff line 55, <$IN> line 167.

Version 2020_03 of uniprot_sprot.fasta starts like this:

>sp|Q6GZX4|001R_FRG3G Putative transcription factor 001R OS=Frog virus 3 (isolate Goorha) OX=654924 GN=FV3-001R PE=4 SV=1

Based on your scripts, this is the example of your first condition.  However, I find that I need to change it (in red) to get it to work as I understand it should work:

                #>sp|Q6GZX4|001R_FRG3G Putative transcription factor 001R OS=Frog virus 3 (isolate Goorha) OX=654924 GN=FV3-001R PE=4 SV=1
if (/>sp\|(\S+)\|\S+\s+(.*?)\s+OS=(.*?)\s+OX=\S+\s+(GN=(.*?)\s+)?PE=/) {
                        $id   = $1;
                        $desc = $2;
                        $org  = $3;
                        $name = $5 || ‘';
}

Compared to what is in 3.01.03:
                #>sp|Q6GZX4|001R_FRG3G Putative transcription factor 001R OS=Frog virus 3 (isolate Goorha) OX=654924 GN=FV3-001R PE=4 SV=1
                if (/>(\S+)\s+(.*?)\s+OS=(.*?)\s+OX=(.*?)\s+(GN=(.*?)\s+)?PE=/) {
                        $id   = $1;
                        $desc = $2;
                        $org  = $3;
                        $name = $6 || '';
                }

Thus, with my edits:
>sp|Q62559|IFT52_MOUSE Intraflagellar transport protein 52 homolog OS=Mus musculus OX=10090 GN=Ift52 PE=1 SV=2

maker_functional_gff would result in:
...Note=Similar to Ift52: Intraflagellar transport protein 52 homolog (Mus musculus);

And maker_function_gff would result in:
Name:"Similar to Ift52 Intraflagellar transport protein 52 homolog (Mus musculus)"

Are these the expected behaviours?

Cheers,

Chris

On Mar 14, 2020, at 1:24 PM, Christopher Keeling <[hidden email]> wrote:

Hello,

In sub parse_blast{, during parsing of uniprot fasta file:

if (/>(\S+)\s+(.*?)\s+OS=(.*?)\s+(GN=(.*?)\s+)?PE=/) {

should be changed to:

if (/>sp\|(\S+)\|\S+\s+(.*?)\s+OS=(.*?)\s+OX=\S+\s+(GN=(.*?)\s+)?PE=/) {

to avoid "Can't use string ("") as a HASH ref while "strict refs" in use at…" errors.


Cheers,
Chris



_______________________________________________
maker-devel mailing list
[hidden email]
http://yandell-lab.org/mailman/listinfo/maker-devel_yandell-lab.org