TickingClock1992 / RIdeogram

165 stars 23 forks source link

Error when trying to put in labels #9

Closed MartinLaforest closed 4 years ago

MartinLaforest commented 4 years ago

Hello, I am running into this error when trying to add labels:

Error in if (label_type == "marker") { : argument is of length zero

It might be a newbie question but I'm stuck, so sorry for asking. Here is the command I run and the 3 files that are fed to R-Studio (attached): files.zip

ideogram(karyotype = Book4[,1-3], label = single, overlaid = 4xdead)

TickingClock1992 commented 4 years ago

Sorry for the delay. I think you just miss a parameter, i.e., "label_type". Maybe you can write your code like this:

ideogram(karyotype = Book4, label = single, label_type = "marker", overlaid = Fourxdead)

Then, you will get a picture like this chromosome

Hope you all good!

MartinLaforest commented 4 years ago

Excellent! Thank you so much!

TickingClock1992 commented 4 years ago

No problem! 😄

GaiaCortinovis6 commented 2 years ago

Hi everyone, I am trying to map some genome-wide data with track labels next to the chromosome idiograms with RIdeogram but I don't understand why it does not work.

This is my code:

upload files

karyotype <-read.table("bean_karyotype.txt", sep = "\t", header = T, stringsAsFactors = F) print(karyotype)

data_Fst <-read.table("data2.txt", sep = ";", header = T, stringsAsFactors = F) print(karyotype)

ideogram with track labels

ideogram(karyotype, label = data_Fst, label_type = "marker", output = "chromosome.svg") convertSVG("chromosome.svg", device = "png")

This is the error that I have: Screenshot (35)

I do not have a lot of expertise in R, I really hope you can help me. Thanks,

Gaia

TickingClock1992 commented 2 years ago

Hello,

Could you send me the input files? Then, I can run the scripts and see what happens.

Thanks,

Dong

2021年12月24日 下午6:08,GaiaCortinovis6 @.***> 写道:

Hi everyone, I am trying to map some genome-wide data with track labels next to the chromosome idiograms with RIdeogram but I don't understand why it does not work.

This is my code:

upload files

karyotype <-read.table("bean_karyotype.txt", sep = "\t", header = T, stringsAsFactors = F) print(karyotype)

data_Fst <-read.table("data2.txt", sep = ";", header = T, stringsAsFactors = F) print(karyotype)

ideogram with track labels

ideogram(karyotype, label = data_Fst, label_type = "marker", output = "chromosome.svg") convertSVG("chromosome.svg", device = "png")

This is the error that I have: https://user-images.githubusercontent.com/96616790/147343256-7fe0bf04-93d6-4010-8e7f-e82ea43bbd42.jpg I do not have a lot of expertise in R, I really hope you can help me. Thanks,

Gaia

— Reply to this email directly, view it on GitHub https://github.com/TickingClock1992/RIdeogram/issues/9#issuecomment-1000767745, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7IR5IGM74XLGOJGR3Y3ADUSRBA7ANCNFSM4LOUVV4A. 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 modified the open/close state.

GaiaCortinovis6 commented 2 years ago

Hi Dong,

Attached are my input files: "bean_katyotype" and "data2".

[bean_karyotype.txt](https://github.com/TickingClock1992/RIdeogram/files/7779356/bean_karyotype.txt) [data2.txt](https://github.com/TickingClock1992/RIdeogram/files/7779357/data2.txt)

TickingClock1992 commented 2 years ago

Hello,

Happy New year. Sorry for the delay.

The problem you have met is not actually a problem. All you need it to change the ‘Color’ into ‘color’ in data2.txt file. Then, you will get the figure as attached with this e-mail.

King regards,

Dong

2021年12月27日 下午4:54,GaiaCortinovis6 @.***> 写道:

Hi Dong,

Attached are my input files: "bean_katyotype" and "data2".

bean_karyotype.txt https://github.com/TickingClock1992/RIdeogram/files/7779356/bean_karyotype.txt data2.txt https://github.com/TickingClock1992/RIdeogram/files/7779357/data2.txt

— Reply to this email directly, view it on GitHub https://github.com/TickingClock1992/RIdeogram/issues/9#issuecomment-1001441754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7IR5I5EJBA54IAZFEFATLUTASUDANCNFSM4LOUVV4A. 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 modified the open/close state.