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

I would like to add x numer of N between concatenated sequences with collapse #98

Open
ericgonzalezs opened this issue Jul 5, 2023 · 2 comments
Labels
enhancement We don't do that here... yet

Comments

@ericgonzalezs
Copy link

I would like to concatenate sequences and add a determined number of N between sequences

Let's say I have these sequences

seq1
AACC
seq2
CCAA
seq3
CCCT

How I could concatenate them and add 2 Ns between them have this

seqNew
AACCNNCCAANNCCCT

Or how to add any required amount of Ns between them?

Many thanks.

@ErdaradunGaztea
Copy link
Member

ErdaradunGaztea commented Jul 5, 2023

For concatenation, there's a tidysq::collapse() function, which would take a single sq object with these three sequences. However, there's no "separator" parameter in here, so first you'd have to add NNs manually. I guess tidysq::paste() might handle that if executed before collapse(), if you pass an sq object with n-1 NN entries and an empty one at the end (tidysq::sq(c(rep("NN", length(your_sequences) - 1), ""), "rna_ext") basically).

Of course, you can replace "NN" with any other expression.

@ErdaradunGaztea ErdaradunGaztea added the question Further information is requested label Jul 5, 2023
@ericgonzalezs
Copy link
Author

It worked, many thanks!

@ErdaradunGaztea ErdaradunGaztea added enhancement We don't do that here... yet and removed question Further information is requested labels Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement We don't do that here... yet
Projects
None yet
Development

No branches or pull requests

2 participants