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

Manhatten plot - multiple charge states #8

Open
nlgittens opened this issue Jan 12, 2022 · 8 comments
Open

Manhatten plot - multiple charge states #8

nlgittens opened this issue Jan 12, 2022 · 8 comments

Comments

@nlgittens
Copy link

Generating a Manhatten plot with some alternative data, I encounter this issue:-

Error in $<-.data.frame(tmp, "protection", value = c(XXXXXXX_2 = 1, : replacement has 96 rows, data has 91

So from what I can gather, the issue is that the original data frame has 96 unique peptides, but the HdxStatsRes object, the function only sees 91. This is because in HdxStatsRes, the charge state is concatenated in; however, region = protein[, c("Start", "End")] does not take into account that you might have several peptides in the dataset with the same ID but different charge state. Is it as easy a fix as simply adding in "Charge" to that line of code? I haven't managed to get the Manhatten plot with my data, so haven't managed to test that out. (I'm getting some errors with that I haven't been able to resolve yet)

@ococrook
Copy link
Owner

Hi Nathan, yes this will be a charge related issue. Could you send me a small example and then I can fix the function?

@nlgittens
Copy link
Author

Yes, I'll put something in our fileshare today.

@ococrook
Copy link
Owner

this should be fixed in the lastest issue. If you just pick one charge state everything should be fine, need to work out what we visualise when there are multiple charge states.

@nlgittens
Copy link
Author

Thanks for working on that Olly; I'm till getting an issue in which R is removing data for 91 peptides (which is all of them) in the Manhattan plot. The diffdata, region and sequences objects all contain data. I don't know if this arning message contains any immediate ideas:-

"Warning message:
Removed 91 rows containing missing values (geom_point)."

@nlgittens
Copy link
Author

I fixed the issue now; although no get a problem where there are more peptides (plotted on the x-axis) than p-values; hdxstats has not left out a gap / removed peptides with no data, and so now there ar a bunch of peptides at the end with no data, and presumably the other p-values are now misaligned

@ococrook
Copy link
Owner

Hard to see how this happens without some data, anything you could share?

@nlgittens
Copy link
Author

I put an example in the fileshare that should be more helpful.

@nlgittens
Copy link
Author

manhattan/multiple charge states reminder

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