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

matchPattern wildcard for AAstringset #34

Open
swuyts opened this issue Jan 22, 2020 · 3 comments
Open

matchPattern wildcard for AAstringset #34

swuyts opened this issue Jan 22, 2020 · 3 comments

Comments

@swuyts
Copy link

swuyts commented Jan 22, 2020

Hi there,

The function matchPattern allows the use of wildcards for DNA sequences;

testnucl <- DNAString("AAAACTAAA")
matchPattern("CNA", testnucl, fixed = F)

Returns:

Views on a 9-letter DNAString subject
subject: AAAACTAAA
views:
    start end width
[1]     5   7     3 [CTA]

While the same strategy for amino acids:

testprot <- AAString("MMMMPSTMMM")
matchPattern("PXT", testprot, fixed = T)

Returns:

Error in normargFixed(fixed, subject) : 
  'fixed' value only supported for a DNA or RNA subject (you can only use 'fixed=TRUE' with your subject)

Is there a reason for this wildcard search not being allowed on amino acid level?

Many thanks in advance,
Sander

@hpages
Copy link
Contributor

hpages commented Apr 17, 2020

Sorry for the delay.

Is there a reason for this wildcard search not being allowed on amino acid level?

No particular reason. It's just that it's not implemented at the moment. New functionalities get implemented based on user needs and you're the first person to express that need. Sounds like it would be a nice improvement. Unfortunately new developments in the Biostrings package have been put on the back burner for a few years now because of other priorities in Bioconductor and I don't think I'll be able to do any work on this in the near future. Want to send a PR?

Thanks,
H.

@swuyts
Copy link
Author

swuyts commented Apr 27, 2020

No worries!

I'll have a look at your current implementation and see what I can do. No promises :)

@ahl27
Copy link
Collaborator

ahl27 commented Mar 30, 2023

This is fixed in https://github.com/ahl27/Biostrings/tree/wildcardAA, will be put up for PR after #97 is merged

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

3 participants