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

a ruby based version of kmer iterations and kmer graph preparation #4

Closed
ghost opened this issue Mar 15, 2024 · 4 comments
Closed

a ruby based version of kmer iterations and kmer graph preparation #4

ghost opened this issue Mar 15, 2024 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 15, 2024

def kmers(sequence, kmer)
=BEGIN
#!/usr/bin/ruby
#Universitat Potsdam
#Date: 2024-3-15
#Author: Gaurav Sablok
=END
seqsplitter = sequence.split(//)
kmeriter = kmer.to_i
seqkmers = []
for i in 0..seqsplitter.length-kmeriter
seqkmers.push(seqsplitter.slice(i,i-i+kmeriter).join)
end
return seqkmers.each { | iter | puts iter.to_s + "\t" + seqkmers.count(iter).to_s }
end

@ghost ghost changed the title a ruby based version of kmer iterations and kmer graph preparation. It counts the kmers and gives the occurrences. An implementation of the exact match string algorithm. a ruby based version of kmer iterations and kmer graph preparation Mar 15, 2024
@ghost ghost closed this as completed Mar 20, 2024
@ghost ghost reopened this Mar 20, 2024
@torognes
Copy link
Member

torognes commented Apr 1, 2024

Sorry, but this does not seem relevant.

@torognes torognes closed this as completed Apr 1, 2024
@ghost
Copy link
Author

ghost commented Apr 1, 2024

@torognes thats ok. I thought of completing it with a ruby version so that users if they are working with ruby can have both. If it doesnt seems like including the same in the same repository that makes sense and i already opened a new repository for the same. lets see if we can put something together. Have a nice week, Gaurav

@torognes
Copy link
Member

torognes commented Apr 1, 2024

Thanks. I think it would be better to make a ruby version in a separate repo. Best wishes

@ghost
Copy link
Author

ghost commented Apr 1, 2024

@torognes yes i already did it and you can find it here. May be we can link it together so that we can point the resources to each other. here is the link if you would like to host the same. I have already hosted yours. https://github.com/sablokgaurav/kmerstring-count-graph

enjoy the evening, Gaurav

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

1 participant