ococrook / hdxstats

hdxstats: An R-package for statistical analysis of hydrogen deuterium exchange mass-spectrometry data.
Apache License 2.0
5 stars 2 forks source link

plotEpitopeMap peptides too long #37

Closed nlgittens closed 1 year ago

nlgittens commented 1 year ago

This is an issue I only just recognised, but also exists in the HOIP dataset: if you look carefully at the plots from the plotEpitopeMap function, each peptide is 1 residue too long on the N-terminus.

image

image

I noticed this as I was getting a perhaps related error that I couldn't resolve that implies that my fasta file was one residue too long/short, where maximum redundancy = 11:

Error in $<-.data.frame(*tmp*, "Z", value = c(1L, 1L, 1L, 1L, 1L, : replacement has 4719 rows, data has 4708

If I artificially reduce the length of the fasta file by 1 aa, the function works. So I also thought that this error occurs when numlines is not a factor of the number of residues (which is an issue when your construct has a prime number of residues!)

ococrook commented 1 year ago

Thanks for spotting - for some reason start was offset by -1. Not sure how that got there but it's fixed and will be correct in the next patch