Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: index out of range [2] with length 0 #388

Closed
tobiasko opened this issue Nov 3, 2022 · 1 comment
Closed

panic: runtime error: index out of range [2] with length 0 #388

tobiasko opened this issue Nov 3, 2022 · 1 comment
Assignees

Comments

@tobiasko
Copy link

tobiasko commented Nov 3, 2022

Describe the bug

I am running a philosopher pipeline command. During the DB annotation step the following error is shown:

time="11:38:55" level=info msg="Executing Pipeline  v4.1.1"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=warning msg="A meta data folder was found and will not be overwritten. "
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_002_S413457_RPA32-IP_Repl2_Group_1"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_003_S413453_IgG-IP_Repl2_Control"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_004_S413458_RPA32-IP_Repl3_Group_1"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_005_S413455_IgG-IP_Repl4_Control"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_007_S413459_RPA32-IP_Repl4_Group_1"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_008_S413456_RPA32-IP_Repl1_Group_1"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_009_S413454_IgG-IP_Repl3_Control"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Initiating the workspace on 20221101_C29563_010_S413452_IgG-IP_Repl1_Control"
time="11:38:55" level=info msg="Creating workspace"
time="11:38:55" level=info msg="Annotating the database"
panic: runtime error: index out of range [2] with length 0

goroutine 1 [running]:
philosopher/lib/dat.ProcessUniProtKB(0xc003661ec1, 0x37, 0xc00376f4d0, 0x86, 0xc000024f90, 0x4, 0x0, 0x0, 0x0, 0x0, ...)
        /home/prvst/workspace/philosopher/lib/dat/db.go:274 +0xc7f
philosopher/lib/dat.(*Base).ProcessDB(0xc00020eb80, 0xc000230280, 0x43, 0xc000024f90, 0x4)
        /home/prvst/workspace/philosopher/lib/dat/dat.go:132 +0x82d
philosopher/lib/dat.Run(0xc000027c80, 0x24, 0xc000230c30, 0x4d, 0xc000027cb0, 0x29, 0xc00002af00, 0x5c, 0xc00002af60, 0x53, ...)
        /home/prvst/workspace/philosopher/lib/dat/dat.go:64 +0xb34
philosopher/lib/pip.AnnotateDatabase(0xc000027b30, 0x24, 0xc000230b40, 0x4b, 0xc000027b60, 0x29, 0xc00002ade0, 0x5a, 0xc00002ae40, 0x51, ...)
        /home/prvst/workspace/philosopher/lib/pip/pip.go:140 +0x26c
philosopher/cmd.glob..func13(0x894f1a0, 0xc0001d5f40, 0x8, 0xa)
        /home/prvst/workspace/philosopher/cmd/pipeline.go:72 +0x41c
github.com/spf13/cobra.(*Command).execute(0x894f1a0, 0xc0001d5e00, 0xa, 0xa, 0x894f1a0, 0xc0001d5e00)
        /home/prvst/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:844 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x894fc20, 0x0, 0x0, 0x0)
        /home/prvst/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
"philosopher.2.txt" 43L, 3086C                                                                                                                          1,1           Top

This error always appears as soon as I add the following sequence as a spike-in to the DB:

>sp|ADD001|iRT-Kit_WR_fusion iRT-Kit WR fusion GN=iRTKit
LGGNEQVTRYILAGVENSKGTFIIDPGGVIRGTFIIDPAAVIRGAGSSEPVTGLDAKTPVISGGPYEYRVEATFGVDESNAKTPVITGAPYEYRDGLDAASYYAPVRADVTPADFSEWSKLFLQFGAQGSPFL

Please complete the following information:

  • OS: Linux
  • Version: 4.1.1

Additional context

The fasta DB is written to disc and contains the respective spike-ins:

tobiasko@fgcz-c-073:/scratch/FRAGPIPE/WU282798$ grep iRT 2022-11-03-decoys-contam-UP000005640.fas 
>rev_sp|ADD001|iRT-Kit_WR_fusion iRT-Kit WR fusion GN=iRTKit
>sp|ADD001|iRT-Kit_WR_fusion iRT-Kit WR fusion GN=iRTKit

I can suppress this behaviour by changing the FASTA header line to:

>sp|ADD001|iRT-Kit_WR_fusion iRT-Kit_WR_fusion
LGGNEQVTRYILAGVENSKGTFIIDPGGVIRGTFIIDPAAVIRGAGSSEPVTGLDAKTPVISGGPYEYRVEATFGVDESNAKTPVITGAPYEYRDGLDAASYYAPVRADVTPADFSEWSKLFLQFGAQGSPFLK
@prvst prvst self-assigned this Dec 15, 2022
@prvst
Copy link
Collaborator

prvst commented Feb 15, 2023

Your sequence was not exactly matching the UniProt standard, but I did some changes and now it should be good.

Fixed. Added to v5.0.0

@prvst prvst closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants