esteinig / netviewr

Mutual nearest neighbor graphs for population structure inference and visualization :octopus:
MIT License
12 stars 2 forks source link

cannot find netviewr #1

Closed AlbertoAbreu closed 2 years ago

AlbertoAbreu commented 2 years ago

Hi Eike:

Was trying to download and install netviewr but I get an error

devtools::install_github("esteinig/netviewr") Error: Failed to install 'unknown package' from GitHub:

Is it due to maintenance or has the package been removed?

best

Alberto

esteinig commented 2 years ago

Apologies @AlbertoAbreu this is due to maintenance and pushing code for the latest version, I'll have it ready by the end of the weekend - including documentation :crossed_fingers:

If you are under time constraints, the stable version and documentation should still work.

I'll keep this issue open and ping you once you can install from GitHub or CRAN (later)

esteinig commented 2 years ago

@AlbertoAbreu should work now:

devtools::install_github("esteinig/netviewr")

Not all documentation is up-to-date and tests still need to be implemented. Have a look here for the population genomics workflow

AlbertoAbreu commented 2 years ago

Thanks Eike, very helpful!

On Fri, 11 Feb 2022 at 23:22, Eike Steinig @.***> wrote:

@AlbertoAbreu https://github.com/AlbertoAbreu should work now:

devtools::install_github("esteinig/netviewr")

Not all documentation is up-to-date and tests still need to be implemented. Have a look here https://github.com/esteinig/netviewr/blob/master/docs/POPGENOM.md for the population genomics workflow

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037014859, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNUCVPLCQNFLN4YN3HDU2X4A5ANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Let me know if you run into any trouble, happy to fix things as we go!

AlbertoAbreu commented 2 years ago

Thanks! I can confirm I was able to install netviewr. One dumb question, however: is netviewr to be used exactly as NetView or are they designed to perform different tasks altogether?

best

Alberto

On Sat, 12 Feb 2022 at 15:57, Eike Steinig @.***> wrote:

Let me know if you run into any trouble, happy to fix things as we go!

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037552676, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNU6MOGWYR5MPA6C4XDU23QW7ANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Good question actually, should add this to the README. It's exactly the same as NetView - except in modern R and hopefully with easier visualization features.

AlbertoAbreu commented 2 years ago

Ah, ok I am so glad. With that clarification it becomes much easier to get our heads around its use.

On Sat, 12 Feb 2022 at 17:41, Eike Steinig @.***> wrote:

Ah, should add this to the README, it's exactly the same as NetView, just in R

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037619551, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNQ7TO5AF7UNJIRI7PLU2345DANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


AlbertoAbreu commented 2 years ago

I am trying out your examples. Do you provide an example for dist.tsv or is it meant to be supplied by the user?

On Sat, 12 Feb 2022 at 18:04, Alberto Abreu @.***> wrote:

Ah, ok I am so glad. With that clarification it becomes much easier to get our heads around its use.

On Sat, 12 Feb 2022 at 17:41, Eike Steinig @.***> wrote:

Ah, should add this to the README, it's exactly the same as NetView, just in R

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037619551, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNQ7TO5AF7UNJIRI7PLU2345DANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Supplied by user at the moment, haven't got one ready but will add in the next week [#4] - anything you can read into a matrix will do, you don't have to use the provided function

esteinig commented 2 years ago

You may want to reinstall the latest push which fixes the %>% operator loading [#5]

AlbertoAbreu commented 2 years ago

Have done so, thanks!

However, I still get the following error:

g <- igraph::sample_gnm(n=10, m=15) %@% # generate random graph with 10 nodes+ node_data %@% # decorate graph with node data tibble+ node_color(data='x', palette='BuGn') %@% # decorate nodes with colors paletted by x+ node_size(data='y', min=5, max=8) # decorate nodes with values rescaled by yError in attr(x, name, exact = TRUE) : 'which' must be of mode character

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, 12 Feb 2022 at 20:34, Eike Steinig @.***> wrote:

You may want to reinstall the latest push which fixes the %>% operator loading [#5 https://github.com/esteinig/netviewr/issues/5]

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037725659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNXJ6FE6RUHJ5LZZE7TU24RCXANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Can you run the following please:

devtools::install_github("esteinig/netviewr")
library(netviewr)

node_data <- tibble::tibble(x=letters[1:10], y=1:10) 
g <- igraph::sample_gnm(n=10, m=15) %@%  node_data %@% node_color(data='x', palette='BuGn') %@% node_size(data='y', min=5, max=8) 
g %>% plot_netview() 
AlbertoAbreu commented 2 years ago

Unfortunately, I get the same error

Error in attr(x, name, exact = TRUE) : 'which' must be of mode character

:((

On Sat, 12 Feb 2022 at 21:33, Eike Steinig @.***> wrote:

Can you run the following (and always without comments) please:

node_data <- tibble::tibble(x=letters[1:10], y=1:10) g <- igraph::sample_gnm(n=10, m=15) %@% node_data %@% node_color(data='x', palette='BuGn') %@% node_size(data='y', min=5, max=8) g %>% plot_netview()

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037761301, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNXKJHUQ5TSCHUUDO2DU24YCDANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

let me try a couple of things, i have some ideas. thanks for helping me debug this.

  1. What's your R version?
  2. Are you on Windows, Mac or Linux?
  3. Close RStudio, open new session, then load again
devtools::install_github("esteinig/netviewr")
library(netviewr)
  1. Can you run the following lines in sequence but separately to see where the error is
node_data <- tibble::tibble(x=letters[1:10], y=1:10) 
g <- igraph::sample_gnm(n=10, m=15) %@%  node_data
g <- g %@% node_color(data='x', palette='BuGn')
g <- g %@% node_size(data='y', min=5, max=8)
g %>% plot_netview() 
  1. When you have the line can you post the full error stacktrace please

I can't reproduce the error on Linux or Windows using R3.6.2 or R4.1.2

AlbertoAbreu commented 2 years ago

Some good news... I closed my RStudio session to have a clean sheet, then loaded your libraries... and your example works fine. Sorry for giving you extra work but I really appreciate your support and the great package!!

On Sat, 12 Feb 2022 at 22:07, Eike Steinig @.***> wrote:

let me try a couple of things, i have some ideas

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037782047, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNSNLJ673APDMCISVY3U244BNANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

No trouble at all - R/RStudio can be a little weird sometimes.

Let me know if anything else comes up, will leave this issue open for now. I also added the minimum k-selection documentation to the population genomics section, should you need it.

AlbertoAbreu commented 2 years ago

Awesome, thanks!

Ok, here we go:

When running graphs %>% tidyr::extract(1:2) %>% plot_netview() # use tidyr extract pipeline

I get this error: Error in UseMethod("extract") : no applicable method for 'extract' applied to an object of class "list"

Then base_graph %@% node_color(data='x', palette='BuGn') %>% plot_netview() runs fine, but when I run base_graph %@% node_color(data='y', palette='PuBu') %>% plot_netview() I get:

Error in f(g) : Data must be character or factor.

On Sat, 12 Feb 2022 at 22:59, Eike Steinig @.***> wrote:

No trouble at all - R/RStudio can be a little weird sometimes.

Let me know if anything else comes up, will leave this issue open for now. I also added the minimum k-selection documentation to the population genomics section, should you need it.

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037813688, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNQK64BB732VHMSECRTU25CDXANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Ah both are on me, first one is kinda irrelevant anyway (will remove) and second one is ok to fail. Data should be character or factor for color assignment but the y column is numeric. Thanks for spotting these

AlbertoAbreu commented 2 years ago

It's me again... sorry

I now have an example distance matrix from my data which I'd like with netviewr but I keep getting errors when using netviewr::read_dist

The example matrix is in the attached file as written to a tsv file. I noticed that the reading routine expects a matrix with no column or row names, which is the way I constructed this file. It is a square matrix (93x93, with 8649 elements) including the diagonal, however.

When I run read_dist(file = "testing_nonames.tsv", sep="\t")

I get

Error in read_dist(file = "testing_nonames.tsv", sep = "\t") : wrong number of elements

Help in getting this cleared up will be welcome. Thanks!

On Sat, 12 Feb 2022 at 23:10, Eike Steinig @.***> wrote:

Ah both are on me, first one is kinda irrelevant anyway (will remove) and second one is ok to fail. Data should be character or factor for color assignment but the y column is numeric. Thanks for spotting these

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1037820419, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNW3VDSMG6WCR5ZUM4TU25DMDANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

I can't really debug this without seeing the matrix.

  1. Is the matrix file tab delineated?
  2. You can just read it into a square matrix any way you like, without using this function. It hasn't been tested yet - important is that you read it into a square matrix object - would try that for now.
AlbertoAbreu commented 2 years ago

Thanks again for your very prompt reply. Of course, you need to see the matrix. I did attach it in my previous mail as I am using this medium to communicate with you. Perhaps you are reading through the github portal and it doesn't allow attachments? Let me know which is the most convenient way for me to send you the file. In case this works, you can download from my dropbox: https://www.dropbox.com/s/28ccw5aykh8c1y5/testing_nonames.tsv?dl=0

Looking forward to solving this issue!

On Sun, 13 Feb 2022 at 15:11, Eike Steinig @.***> wrote:

I can't really debug this without seeing the matrix.

  1. Is the matrix file tab delineated?
  2. You can just read it into a square matrix any way you like, without using this function. It hasn't been tested yet - important is that you read it into a square matrix object - would try that for now.

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1038452146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNQXKX6YLUKLBE4TLELU3AUADANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

I just realized you had attached it, my apologies! I think it didn't attach for some reason.

Thanks so much for this, will have a look (might be an hour because of meetings). I've got the file, you can delete it from the Dropbox, if you would prefer no one else to access it :)

esteinig commented 2 years ago

My bad again, the read_dist function is messed up, try this:

dist <- as.matrix(read.csv("testing_nonames.tsv", sep = "\t", header=FALSE))

Looks really interesting in the network topology, for a basic start:

graphs <- dist %>% netview(k=1:82)
graphs$k20 %>% plot_netview()

K-selection plot:

cgraphs <- graphs %@% community(method=c("infomap", "fast_greedy"))
cgraphs %>% plot_kselect()

Indicates around k = 20 as a good elbow value, might be interesting to look at Admixture and proportions across the structure in the network. I will add the docs for that next weekend / after work maybe this week

esteinig commented 2 years ago

You'll of course have to add your meta data and probably make the plots a bit nicer looking (reduce node size, colors by sampling location or trait etc) - this is just to get you started.

AlbertoAbreu commented 2 years ago

Cool, thanks!

I will be working on the dataset this week... Is there an option to avoid drawing IDs on the nodes (I now know how to do this) and instead have a legend for the Groups?

On Sun, 13 Feb 2022 at 17:23, Eike Steinig @.***> wrote:

You'll of course have to add your meta data and probably make the plots a bit nicer looking (reduce node size, colors by sampling location or trait etc) - this is just to get you started.

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1038493028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNSXZHXJWSQR5UBI7MLU3BDP5ANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Not sure what you mean, but you can modify the plot_netview function the same way as the igraph::plot.igraph function by passing the same parameters into it. But that's a bit beyond my scope and time to explain.

AlbertoAbreu commented 2 years ago

Ok, not to worry... I will learn as I plod through, thanks!

On Sun, 13 Feb 2022 at 18:17, Eike Steinig @.***> wrote:

Not sure what you mean, but you can modify the plot_netview function the same way as the igraph::plot.igraph function by passing the same parameters into it. But that's a bit beyond my scope and time to explain.

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1038523569, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNSFEDHPYYXI3QDBKGLU3BJ27ANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

If I understand you correctly, you can decorate the graphs with a data frame with a group identifier for each isolate (character or factor), and then use the node_color decorator to link that to the node colors and a palette / vector of colors, but have a look in the decorator function section

I'll be able to work on this again next weekend and add this to the tutorial section, but shouldn't be too hard to figure out - since you got all this way already :)

No node labels should be default but otherwise something like:

graphs$k20 %@% node_label(data=NULL) %>% plot_netview()

Final thing you don't have to use the plot_netview function, this is just to link decorated data to the graph visualization. You can use the standard igraph::plot.igraph function with the graph object from netview builder.

AlbertoAbreu commented 2 years ago

Great! I was getting there, and managed to work out how to draw the legend based on one of the fields in my metadata. But that section on the decorator function is just what I was needing. Thanks!! Let me know if it's ok to keep finding bugs

On Sun, 13 Feb 2022 at 18:21, Eike Steinig @.***> wrote:

If I understand you correctly, you can decorate the graphs with a data frame with a group identifier for each isolate (character or factor), and then use the node_color decorator to link that to the node colors and a palette / vector of colors, but have a look in the decorator function section https://github.com/esteinig/netviewr/blob/master/docs/DECFUNC.md

— Reply to this email directly, view it on GitHub https://github.com/esteinig/netviewr/issues/1#issuecomment-1038525693, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLFNQ6SEEW2DG6DTIPKJTU3BKHXANCNFSM5OCVNTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--


Alberto Abreu Grobois, Ph. D. Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia UNAM Apartado Postal 811 Mazatlan, Sinaloa 82000 MEXICO

PARA PAQUETERIA/ FOR PARCEL POST Laboratorio de Genetica Unidad Academica Mazatlan Instituto de Ciencias del Mar y Limnologia (UNAM) Calz. Joel Montes Camarena s/n Mazatlan, Sinaloa 82040 MEXICO

tel. 52 (669) 985-28-45,-46,-47,-48 ext 215 fax. 52 (669) 982-61-33


esteinig commented 2 years ago

Ah great! Of course, feel free to post them here

esteinig commented 2 years ago

I'll close this for now, but feel free to re-open should you run into something else! Thanks for the help debugging some of these things and improving the documentation :)