iferres / pagoo

A comprehensive and intuitive encapsulated OO class system for analyzing bacterial pangenomes in R.
https://iferres.github.io/pagoo/
28 stars 4 forks source link

panaroo_2_pagoo error #53

Closed hayleyjaywilson closed 3 years ago

hayleyjaywilson commented 3 years ago

Hi, I am following the panaroo_2_pagoo instructions exactly and using the gene_presence_absence.csv file (unchanged from its output from panaroo) and I am getting the following error: gffs <- list.files(path = "full_path/new_spades_annotations/", pattern = "[.]gff$", full.names = TRUE) gpa_csv <- "full_path/panaroo_spades/gene_presence_absence.csv"

library(pagoo) pg <- panaroo_2_pagoo(gene_presence_absence_csv = gpa_csv, gffs = gffs)

Reading csv file (panaroo). Processing csv file. Warning in panaroo_2_pagoo(gene_presence_absence_csv = gpa_csv, gffs = gffs) : Removing refound genes with stop codon (tagged with '_stop') Error in df[[COL]][[ROW]] <- df[[COL]][[ROW]][-INDEX] : replacement has length zero

I have tried a number of things and I do not seem to be getting anywhere! Can anyone help?

iferres commented 3 years ago

Hi @hayleyjaywilson, thanks for giving pagoo a try!

I'm not sure what the error means, but I guess is something related to keys which don't match between the gffs and the csv file. In some cases Panaroo changes some identifiers if it finds repeated contig or gene names between samples, and uses it own nomenclature, breaking the relationship between input (gff files) and output (csv). How many gffs are you using? If there aren't many and if you don't mind you could send me the gff files and the csv so I can reproduce the error and try to fix it.

Otherwise I suggest you to try to build the pagoo input from scratch (see this tutorial), although you need to have some R skills to do that.

hayleyjaywilson commented 3 years ago

Hi,

Thanks for the response. The dataset is more than 1100 isolates. But I could make a sample one of four or five and send it over?

Hayley


From: Ignacio Ferrés @.> Sent: 21 October 2021 13:53 To: iferres/pagoo @.> Cc: Hayley Joanna Wilson @.>; Mention @.> Subject: Re: [iferres/pagoo] panaroo_2_pagoo error (Issue #53)

Hi @hayleyjaywilsonhttps://github.com/hayleyjaywilson, thanks for giving pagoo a try!

I'm not sure what the error means, but I guess is something related to keys which don't match between the gffs and the csv file. In some cases Panaroo changes some identifiers if it finds repeated contig or gene names between samples, and uses it own nomenclature, breaking the relationship between input (gff files) and output (csv). How many gffs are you using? If there aren't many and if you don't mind you could send me the gff files and the csv so I can reproduce the error and try to fix it.

Otherwise I suggest you to try to build the pagoo input from scratch (see this tutorialhttps://iferres.github.io/pagoo/articles/Input.html), although you need to have some R skills to do that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/iferres/pagoo/issues/53#issuecomment-948585923, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATR6G7RFVQTASWFVOOIW3UTUIAEN5ANCNFSM5GNZM3WA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

iferres commented 3 years ago

Oh.. that's a lot 😅

Yes, probably making a subset is best, although make sure that the error keeps popping up.

hayleyjaywilson commented 3 years ago

Hi there,

Same error with a subset of five isolates. Happy to share the data if this is helpful

Hayley


From: Ignacio Ferrés @.> Sent: 21 October 2021 14:32 To: iferres/pagoo @.> Cc: Hayley Joanna Wilson @.>; Mention @.> Subject: Re: [iferres/pagoo] panaroo_2_pagoo error (Issue #53)

Oh.. that's a lot 😅

Yes, probably making a subset is best, although make sure that the error keeps popping up.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/iferres/pagoo/issues/53#issuecomment-948622088, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATR6G7UOYPR4INURSN7V2ZTUIAJAPANCNFSM5GNZM3WA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

iferres commented 3 years ago

Great, you can attach it here or send them to my email. iferres@pasteur.edu.uy Don't forget to attach the gffs and the csv. I have some some things to do, I expect to be more available since next Tuesday, I'll try to come back asap.

iferres commented 3 years ago

Hey @hayleyjaywilson I just pushed a patch. Please reinstall pagoo like:

devtools::install_github("iferres/pagoo")

Let me know if it fixes the error.