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

additional functionality when extracting random sequences #2

Open
avancise opened this issue Sep 5, 2019 · 5 comments
Open

additional functionality when extracting random sequences #2

avancise opened this issue Sep 5, 2019 · 5 comments

Comments

@avancise
Copy link

avancise commented Sep 5, 2019

Hi,

I just stumbled across your package today while looking for a way to extract the same set of 10,000 1000kb loci randomly from five different genomes. Thank you so much for writing this package, I think it's going to be a huge help in this process. If you're still open to hearing requests for additional functionality/flexibility, I have two questions for you. For your function 'extract_random_seqs_from_genome', is it possible to set it so that replacement = FALSE once each random locus is selected and extracted (or is this already true)? Would it also be possible to set a minimum distance between randomly selected loci, e.g. if I wanted to specify that all loci are at least 50bp apart?

Thank you,
Amy

HajkD added a commit that referenced this issue Sep 5, 2019
…om_seqs_from_genome() #2 (Many thanks to Amy Van Cise)
@HajkD
Copy link
Member

HajkD commented Sep 5, 2019

Hi Amy,

Many thanks for contacting me and I am very happy to hear that you find metablastr useful!
I will try to take some time in the future to write some Vignettes to show the full scope of the package functionality.

Regarding your requests:

I just added the replace and prob arguments to extract_random_seqs_from_genome() so that you can specify it according to your needs. The default option is replace = TRUE.

I very much like your second request to draw random loci with a minimum distance to each other. Since this will require a more substantial amount of time to implement, I put it down as a feature request and will work on it as soon as I find some time for this.

Please feel free to add more ideas and requests and I will try my best to keep up with them :-)

Thank you so much!

Best wishes,
Hajk

@avancise
Copy link
Author

avancise commented Sep 5, 2019 via email

HajkD added a commit that referenced this issue Sep 5, 2019
extract_random_seqs_from_genome(), the command will still hold 'replace = TRUE' for the chromosome and strand to be sampled, but the sequence that
was sampled will be removed #2
@HajkD
Copy link
Member

HajkD commented Sep 5, 2019

Hi Amy,

Thank you so much for your detailed response and I would be truly grateful if
if you could add these feature requests as a separate issue. I very much like all of these ideas and I am happy to add them to metablastr.

Just to confirm your question:

Just to make sure I understand correctly if I add replace = FALSE to
extract_random_seqs_from_genome(), the command will still hold replace = TRUE for the chromosome and strand to be sampled, but the 1kb sequence that
was sampled will be removed?

Initially, I also passed the replace argument to the chromosome and strand sampling, but
I now changed this and adapted it to your upper request. So yes, now the command will still hold replace =TRUE for the chromosome and strand to be sampled, but the 1kb sequence that was sampled will be removed :-)

Or does adding replace = FALSE to the command
affect all three of the sampling levels in the command?

Not anymore. But please let me know if you would find this functionality useful as well.

I hope this helps?

Thank you very much for all your help with this and for contributing these super useful ideas!

Best,
Hajk

@avancise
Copy link
Author

avancise commented Sep 6, 2019

Hi again Hajk,

Thank you again! This edit to the functionality of replace = TRUE in extract_random_seqs_from_genome() seems perfect to me. I submitted two new feature requests for the options I mentioned above. Let me know if I can do anything else, and thank you for working on these enhancements!

Best,
Amy

@HajkD
Copy link
Member

HajkD commented Sep 6, 2019

Hi Amy,

I am very happy that it works for you now and thank you very much for opening the other feature requests :-)

I will start working on them once I find a bit of spare time.

Many thanks,
Hajk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants