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

Consistent error: if (is.na(gsParam$synteny$hogs)) { : argument is of length zero #174

Open
Toffeeladd opened this issue Nov 18, 2024 · 5 comments

Comments

@Toffeeladd
Copy link

Hi, thanks for such a great program. I am getting the same issue as #75 and #165

I am having exactly the same issue when using orthofinder 2.5.5 with R 4.4.2 and GENESPACE 1.3.1 via WSL. I am running orthofinder outside of Genespace and then copying the results into the wd/. run_genespace() was working the first time when testing on 3 genomes and continues to work if I run with the original orthofinder output.

Now I am doing a much larger run with 43 genomes and a new orthofinder run (which completed successfully) I'm consistently getting if (is.na(gsParam$synteny$hogs)) { : argument is of length zero

This is the full error for context:

1. Running orthofinder (or parsing existing results) Checking for existing orthofinder results ... [1] FALSE ... found existing run, not re-running orthofinder Error in if (is.na(gsParam$synteny$hogs)) { : argument is of length zero

I have tried:

  • Deleting all the previous runs (like others who have run into this error suggested)
  • Reinstalling Genespace R package multiple times
  • Copying N0.tsv directly to the wd/results
  • Reinstalling R and rebuilding all packages

I understand running on 43 genomes is alot and I have not seen any other people using it for that many genomes. I am less interested in the plots and more in pan_genes outputs.

If you have any suggestions to how to work around this error I would really appreciate it.

@jtlovell
Copy link
Owner

hmm. before we try anything else, can you do this:

ofRes <- find_ofFiles("path/to/orthofinder/run")
print(ofRes$hogs)

@Toffeeladd
Copy link
Author

Thanks for getting back so quickly.

This finds the N0.tsv file and puts it in wd/results but a subsequent run still does not work and returns the same error

ofRes <- find_ofFiles("/mnt/c/Users/username/Documents/PhD/GENESPACE/input_files/wd/orthofinder")
> print(ofRes$hogs)
[1] "/mnt/c/Users/username/Documents/PhD/GENESPACE/input_files/wd/orthofinder/Results_Nov12/Phylogenetic_Hierarchical_Orthogroups/N0.tsv"

@jtlovell
Copy link
Owner

jtlovell commented Nov 19, 2024

Hmm ... so when you run init_genespace, you get no errors, then when you run run_genespace, it errors out with "Error in if (is.na(gsParam$synteny$hogs)) {...".

Can you run this:

test <- init_genespace(...) # add the parameters you used previously
synParam <- set_syntenyParams(test)
print(synParam$synteny$hogs)

@Toffeeladd
Copy link
Author

Correct no errors with init_genespace and the error is only in run_genespace

I ran the above code:

test <- init_genespace(
+   wd = wd,
+   path2mcscanx = path2mcscanx)
Checking Working Directory ... PASS: `/mnt/c/Users/username/Documents/PhD/GENESPACE/input_files/wd`
Checking user-defined parameters ...
        Genome IDs & ploidy ...
                Brassica_oleracea_var_italica       : 1
                Brassica_oleracea                   : 1
                Brassica_rapaZ1                     : 1
                Brassica_tournefortii               : 1
                Citrullus_lanatus_subsp.cordophanus : 1
                Citrullus_lanatus_subsp.vulgaris    : 1
                Citrullus_mucosospermus             : 1
                Citrus_ichangensis                  : 1
                Citrus_linwuensis                   : 1
                Citrus_reticulata                   : 1
                Coix_aquatica                       : 1
                Fagopyrum_esculentum                : 1
                Fagopyrum_homotropicum              : 1
                Fallopia_multiflora                 : 1
                Hordeum_marinum                     : 1
                Hordeum_vulgare_cultivar            : 1
                Hordeum_vulgare_wild_type           : 1
                Juglans_californica                 : 1
                Juglans_cinerea                     : 1
                Juglans_nigra                       : 1
                Oryza_barthii                       : 1
                Oryza_rufipogon                     : 1
                Oryza_sativa                        : 1
                Panicum_hallii                      : 1
                Prunus_davidiana                    : 1
                Prunus_mira                         : 1
                Prunus_persica                      : 1
                Setaria_itallica                    : 1
                Setaria_viridis                     : 1
                Solanum_buesii                      : 1
                Solanum_candolleanum                : 1
                Solanum_galapagense                 : 1
                Solanum_lycopersicum                : 1
                Solanum_pimpinellifolium            : 1
                Solanum_tuberosum_PG6247            : 1
                Sorghum_bicolor_ssp.verticilliflorum: 1
                Sorghum_bicolor                     : 1
                Vitis_labrusca                      : 1
                Vitis_vinifera_cultivated           : 1
                Vitis_vinifera_ssp.sylvestris       : 1
                Zea_luxurians                       : 1
                Zea_mays_subsp.parviglumis          : 1
                Zea_MaysB73                         : 1
        Outgroup ... NONE
        n. parallel processes ... 6
        collinear block size ... 5
        collinear block search radius ... 25
        n gaps in collinear block ... 5
        synteny buffer size... 100
        only orthogroups hits as anchors ... TRUE
        n secondary hits ... 0
Checking annotation files (.bed and peptide .fa):
        Brassica_oleracea_var_italica       : 56434 / 56434 geneIDs exactly match (PASS)
        Brassica_oleracea                   : 57044 / 57044 geneIDs exactly match (PASS)
        Brassica_rapaZ1                     : 51013 / 51013 geneIDs exactly match (PASS)
        Brassica_tournefortii               : 41739 / 41739 geneIDs exactly match (PASS)
        Citrullus_lanatus_subsp.cordophanus : 20910 / 20910 geneIDs exactly match (PASS)
        Citrullus_lanatus_subsp.vulgaris    : 20540 / 20540 geneIDs exactly match (PASS)
        Citrullus_mucosospermus             : 20609 / 20609 geneIDs exactly match (PASS)
        Citrus_ichangensis                  : 30458 / 30458 geneIDs exactly match (PASS)
        Citrus_linwuensis                   : 30306 / 30306 geneIDs exactly match (PASS)
        Citrus_reticulata                   : 27312 / 27312 geneIDs exactly match (PASS)
        Coix_aquatica                       : 35123 / 35123 geneIDs exactly match (PASS)
        Fagopyrum_esculentum                : 36119 / 36119 geneIDs exactly match (PASS)
        Fagopyrum_homotropicum              : 38796 / 38796 geneIDs exactly match (PASS)
        Fallopia_multiflora                 : 41409 / 41409 geneIDs exactly match (PASS)
        Hordeum_marinum                     : 41011 / 41011 geneIDs exactly match (PASS)
        Hordeum_vulgare_cultivar            : 49046 / 49046 geneIDs exactly match (PASS)
        Hordeum_vulgare_wild_type           : 54365 / 54365 geneIDs exactly match (PASS)
        Juglans_californica                 : 31263 / 31263 geneIDs exactly match (PASS)
        Juglans_cinerea                     : 31432 / 31432 geneIDs exactly match (PASS)
        Juglans_nigra                       : 31500 / 31500 geneIDs exactly match (PASS)
        Oryza_barthii                       : 37113 / 37113 geneIDs exactly match (PASS)
        Oryza_rufipogon                     : 41967 / 41967 geneIDs exactly match (PASS)
        Oryza_sativa                        : 38055 / 38055 geneIDs exactly match (PASS)
        Panicum_hallii                      : 31994 / 31994 geneIDs exactly match (PASS)
        Prunus_davidiana                    : 29085 / 29085 geneIDs exactly match (PASS)
        Prunus_mira                         : 28070 / 28070 geneIDs exactly match (PASS)
        Prunus_persica                      : 27894 / 27894 geneIDs exactly match (PASS)
        Setaria_itallica                    : 35900 / 35900 geneIDs exactly match (PASS)
        Setaria_viridis                     : 35704 / 35704 geneIDs exactly match (PASS)
        Solanum_buesii                      : 43019 / 43019 geneIDs exactly match (PASS)
        Solanum_candolleanum                : 37071 / 37071 geneIDs exactly match (PASS)
        Solanum_galapagense                 : 31866 / 31866 geneIDs exactly match (PASS)
        Solanum_lycopersicum                : 46207 / 46207 geneIDs exactly match (PASS)
        Solanum_pimpinellifolium            : 34328 / 34328 geneIDs exactly match (PASS)
        Solanum_tuberosum_PG6247            : 38290 / 38290 geneIDs exactly match (PASS)
        Sorghum_bicolor_ssp.verticilliflorum: 31801 / 31801 geneIDs exactly match (PASS)
        Sorghum_bicolor                     : 31304 / 31304 geneIDs exactly match (PASS)
        Vitis_labrusca                      : 30779 / 30779 geneIDs exactly match (PASS)
        Vitis_vinifera_cultivated           : 27790 / 27790 geneIDs exactly match (PASS)
        Vitis_vinifera_ssp.sylvestris       : 38652 / 38652 geneIDs exactly match (PASS)
        Zea_luxurians                       : 72202 / 72202 geneIDs exactly match (PASS)
        Zea_mays_subsp.parviglumis          : 46218 / 46218 geneIDs exactly match (PASS)
        Zea_MaysB73                         : 41921 / 41921 geneIDs exactly match (PASS)
Checking dependencies ...
        Found valid MCScanX_h executable: `/mnt/c/Users/username/Documents/PhD/GENESPACE/apps/MCScanX/MCScanX_h`
>
>
>
> synParam <- set_syntenyParams(test)
> print(synParam$synteny$hogs)
NULL

@jtlovell
Copy link
Owner

Thanks for the help troubleshooting Noah ... I'll communicate with you via email and post a resolution here when we reach one.

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