fasta_motif_sliding_generator 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f431885444d38f5babce8de76bc43866383cc7a391928fe2e43d127bca47e0ba
4
+ data.tar.gz: 6836bd18ed1e3276b0530ad0818c1c9cb800f9fecb78089ddeadda5030530f61
5
+ SHA512:
6
+ metadata.gz: abbc9b5d0d79b48160d5a3c2dc1a438831b71d9b1ae9f1ef2f5554a07af38797390bd2f15e43888c81b6df81e1a13d24d7cd2cbfe7389a50758fb6e1bc5d3e9b
7
+ data.tar.gz: 786a7a6bb365f81bc0c9cdb0bc78dd5f22ba9d6d904935a5e28ee3add09c926108aa5fc375d12da427b3b0a1c68f5cad2836dea25f829817804d2a6fafbf9fa5
@@ -0,0 +1,33 @@
1
+ class FastaMotifSlidingGenerator
2
+ =begin
3
+ a fasta class to make genomic sliding window for the
4
+ if you have a binding site and you want to prepare
5
+ the motifs for the binding site as a sliding window
6
+ you can also use the same. You can also search the
7
+ sliding window motifs starting with the particular tag
8
+ to see how many of them are generated.
9
+ =end
10
+ def initialize(fasta_sequence, takeiter, motif)
11
+ @fasta = fasta_sequence
12
+ @take = takeiter.to_i
13
+ @motif = motif.to_s
14
+ end
15
+ def sequencechunk
16
+ fasta_block = @fasta.split(//)
17
+ fasta_chunk_sequences = []
18
+ for i in 0..fasta_block.length-@take
19
+ fasta_chunk_sequences.push(fasta_block.slice(i,i-i+@take).join)
20
+ end
21
+ return fasta_chunk_sequences
22
+ end
23
+ def returnmotif
24
+ fasta_block = @fasta.split(//)
25
+ fasta_chunk_sequences = []
26
+ for i in 0..fasta_block.length-@take
27
+ fasta_chunk_sequences.push(fasta_block.slice(i,i-i+@take).join)
28
+ fasta_motifs = []
29
+ fasta_chunk_sequences.each{|fasta| puts fasta_motifs.push(fasta) if fasta.start_with?(@motif)}
30
+ end
31
+ return fasta_motifs
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fasta_motif_sliding_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Gaurav Sablok
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-09-01 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/fasta_motif_sliding_generator.rb
20
+ homepage: https://github.com/sablokgaurav/pacbio_oxford_assembly_binding_ruby_motif_scanner
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubygems_version: 3.4.19
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: Generates the sliding iterable for the given fasta stretch and check its
43
+ starting motifs
44
+ test_files: []