seqtrimnext 2.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. data/History.txt +3 -0
  2. data/Manifest.txt +114 -0
  3. data/PostInstall.txt +7 -0
  4. data/README.rdoc +159 -0
  5. data/Rakefile +38 -0
  6. data/bin/create_graphs.rb +46 -0
  7. data/bin/extract_seqs.rb +45 -0
  8. data/bin/extract_seqs_from_fasta.rb +56 -0
  9. data/bin/extract_seqs_from_fastq.rb +45 -0
  10. data/bin/fasta2fastq.rb +38 -0
  11. data/bin/fastq2fasta.rb +35 -0
  12. data/bin/gen_qual.rb +46 -0
  13. data/bin/get_seq.rb +46 -0
  14. data/bin/group_by_range.rb +17 -0
  15. data/bin/join_ilumina_paired.rb +130 -0
  16. data/bin/parse_amplicons.rb +95 -0
  17. data/bin/parse_json_results.rb +66 -0
  18. data/bin/parse_params.rb +82 -0
  19. data/bin/resume_clusters.rb +48 -0
  20. data/bin/resume_rejected.sh +9 -0
  21. data/bin/reverse_paired.rb +49 -0
  22. data/bin/seqtrimnext +368 -0
  23. data/bin/split_fastq.rb +42 -0
  24. data/bin/split_ilumina_paired.rb +65 -0
  25. data/bin/split_paired.rb +70 -0
  26. data/lib/seqtrimnext/actions/action_ab_adapter.rb +32 -0
  27. data/lib/seqtrimnext/actions/action_ab_far_adapter.rb +32 -0
  28. data/lib/seqtrimnext/actions/action_ab_left_adapter.rb +32 -0
  29. data/lib/seqtrimnext/actions/action_empty_insert.rb +22 -0
  30. data/lib/seqtrimnext/actions/action_ignore_repeated.rb +24 -0
  31. data/lib/seqtrimnext/actions/action_indetermination.rb +30 -0
  32. data/lib/seqtrimnext/actions/action_induced_low_complexity.rb +29 -0
  33. data/lib/seqtrimnext/actions/action_insert.rb +32 -0
  34. data/lib/seqtrimnext/actions/action_is_contaminated.rb +30 -0
  35. data/lib/seqtrimnext/actions/action_key.rb +30 -0
  36. data/lib/seqtrimnext/actions/action_left_adapter.rb +32 -0
  37. data/lib/seqtrimnext/actions/action_left_primer.rb +17 -0
  38. data/lib/seqtrimnext/actions/action_linker.rb +30 -0
  39. data/lib/seqtrimnext/actions/action_low_complexity.rb +30 -0
  40. data/lib/seqtrimnext/actions/action_low_high_size.rb +31 -0
  41. data/lib/seqtrimnext/actions/action_low_quality.rb +33 -0
  42. data/lib/seqtrimnext/actions/action_mid.rb +30 -0
  43. data/lib/seqtrimnext/actions/action_multiple_linker.rb +29 -0
  44. data/lib/seqtrimnext/actions/action_paired_reads.rb +28 -0
  45. data/lib/seqtrimnext/actions/action_poly_a.rb +29 -0
  46. data/lib/seqtrimnext/actions/action_poly_t.rb +29 -0
  47. data/lib/seqtrimnext/actions/action_rem_adit_artifacts.rb +32 -0
  48. data/lib/seqtrimnext/actions/action_right_adapter.rb +29 -0
  49. data/lib/seqtrimnext/actions/action_right_primer.rb +25 -0
  50. data/lib/seqtrimnext/actions/action_short_insert.rb +32 -0
  51. data/lib/seqtrimnext/actions/action_unexpected_poly_t.rb +29 -0
  52. data/lib/seqtrimnext/actions/action_unexpected_vector.rb +31 -0
  53. data/lib/seqtrimnext/actions/action_vectors.rb +31 -0
  54. data/lib/seqtrimnext/actions/seqtrim_action.rb +136 -0
  55. data/lib/seqtrimnext/classes/action_manager.rb +47 -0
  56. data/lib/seqtrimnext/classes/em_classes/seqtrim_work_manager.rb +335 -0
  57. data/lib/seqtrimnext/classes/em_classes/seqtrim_worker.rb +290 -0
  58. data/lib/seqtrimnext/classes/extract_stats.rb +255 -0
  59. data/lib/seqtrimnext/classes/gnu_plot_graph.rb +140 -0
  60. data/lib/seqtrimnext/classes/graph_stats.rb +74 -0
  61. data/lib/seqtrimnext/classes/install_database.rb +43 -0
  62. data/lib/seqtrimnext/classes/install_requirements.rb +123 -0
  63. data/lib/seqtrimnext/classes/list_db.rb +49 -0
  64. data/lib/seqtrimnext/classes/make_blast_db.rb +113 -0
  65. data/lib/seqtrimnext/classes/one_blast.rb +41 -0
  66. data/lib/seqtrimnext/classes/params.rb +387 -0
  67. data/lib/seqtrimnext/classes/piro.rb +78 -0
  68. data/lib/seqtrimnext/classes/plugin_manager.rb +153 -0
  69. data/lib/seqtrimnext/classes/scan_for_restr_site.rb +138 -0
  70. data/lib/seqtrimnext/classes/scbi_stats.rb +68 -0
  71. data/lib/seqtrimnext/classes/seqtrim.rb +317 -0
  72. data/lib/seqtrimnext/classes/sequence.rb +55 -0
  73. data/lib/seqtrimnext/classes/sequence_group.rb +72 -0
  74. data/lib/seqtrimnext/classes/sequence_with_action.rb +503 -0
  75. data/lib/seqtrimnext/plugins/plugin.rb +267 -0
  76. data/lib/seqtrimnext/plugins/plugin_ab_adapters.rb +189 -0
  77. data/lib/seqtrimnext/plugins/plugin_adapters.rb +165 -0
  78. data/lib/seqtrimnext/plugins/plugin_amplicons.rb +221 -0
  79. data/lib/seqtrimnext/plugins/plugin_contaminants.rb +209 -0
  80. data/lib/seqtrimnext/plugins/plugin_extract_inserts.rb +438 -0
  81. data/lib/seqtrimnext/plugins/plugin_find_poly_at.rb +393 -0
  82. data/lib/seqtrimnext/plugins/plugin_ignore_repeated.rb +101 -0
  83. data/lib/seqtrimnext/plugins/plugin_indeterminations.rb +199 -0
  84. data/lib/seqtrimnext/plugins/plugin_key.rb +70 -0
  85. data/lib/seqtrimnext/plugins/plugin_linker.rb +232 -0
  86. data/lib/seqtrimnext/plugins/plugin_low_complexity.rb +98 -0
  87. data/lib/seqtrimnext/plugins/plugin_low_high_size.rb +74 -0
  88. data/lib/seqtrimnext/plugins/plugin_low_quality.rb +394 -0
  89. data/lib/seqtrimnext/plugins/plugin_mids.rb +231 -0
  90. data/lib/seqtrimnext/plugins/plugin_rem_adit_artifacts.rb +246 -0
  91. data/lib/seqtrimnext/plugins/plugin_short_insert.rb +244 -0
  92. data/lib/seqtrimnext/plugins/plugin_vectors.rb +191 -0
  93. data/lib/seqtrimnext/templates/amplicons.txt +16 -0
  94. data/lib/seqtrimnext/templates/genomics_454.txt +5 -0
  95. data/lib/seqtrimnext/templates/genomics_454_with_paired.txt +5 -0
  96. data/lib/seqtrimnext/templates/low_quality.txt +5 -0
  97. data/lib/seqtrimnext/templates/low_quality_and_low_complexity.txt +5 -0
  98. data/lib/seqtrimnext/templates/transcriptomics_454.txt +8 -0
  99. data/lib/seqtrimnext/templates/transcriptomics_plants.txt +8 -0
  100. data/lib/seqtrimnext/utils/extract_samples.rb +52 -0
  101. data/lib/seqtrimnext/utils/fasta2xml.rb +69 -0
  102. data/lib/seqtrimnext/utils/global_match.rb +65 -0
  103. data/lib/seqtrimnext/utils/hash_stats.rb +29 -0
  104. data/lib/seqtrimnext/utils/json_utils.rb +50 -0
  105. data/lib/seqtrimnext/utils/load_fasta_names_in_hash.rb +37 -0
  106. data/lib/seqtrimnext/utils/load_qual_in_hash.rb +37 -0
  107. data/lib/seqtrimnext/utils/recover_mid.rb +95 -0
  108. data/lib/seqtrimnext/utils/string_utils.rb +56 -0
  109. data/lib/seqtrimnext.rb +37 -0
  110. data/script/console +10 -0
  111. data/script/destroy +14 -0
  112. data/script/generate +14 -0
  113. data/test/test_helper.rb +3 -0
  114. data/test/test_seqtrimnext.rb +11 -0
  115. metadata +318 -0
@@ -0,0 +1,30 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionIndetermination < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+ end
16
+
17
+ # def apply_to(seq)
18
+ #
19
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
20
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name} . BEGIN: #{@start_pos} END: #{@end_pos} "
21
+ #
22
+ # end
23
+
24
+ def apply_decoration(char)
25
+ return char.on_red
26
+
27
+ end
28
+
29
+
30
+ end
@@ -0,0 +1,29 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionInducedLowComplexity < SeqtrimAction
11
+ def initialize(start_pos,end_pos)
12
+ super(start_pos,end_pos)
13
+ @cut =true
14
+ end
15
+
16
+ # def apply_to(seq)
17
+ #
18
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
19
+ # $LOG.debug " Applying #{self.class} "
20
+ #
21
+ # end
22
+
23
+
24
+ def apply_decoration(char)
25
+ return char.red.bold
26
+ end
27
+
28
+
29
+ end
@@ -0,0 +1,32 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute ActionInserted
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionInsert < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =false
15
+ @informative = true
16
+ end
17
+
18
+ # #this method is launched when the size of inserted is enough
19
+ # def apply_to(seq)
20
+ #
21
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
22
+ # $LOG.debug " Applying #{self.class}. ------Inserted has enough size ------ . BEGIN: #{@start_pos} END: #{@end_pos} "
23
+ #
24
+ #
25
+ # end
26
+
27
+ def apply_decoration(char)
28
+ return char
29
+ end
30
+
31
+
32
+ end
@@ -0,0 +1,30 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionIsContaminated < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+ end
16
+
17
+ # def apply_to(seq)
18
+ #
19
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
20
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name} . BEGIN: #{@start_pos} END: #{@end_pos} "
21
+ #
22
+ # end
23
+
24
+ def apply_decoration(char)
25
+ return char.red
26
+
27
+ end
28
+
29
+
30
+ end
@@ -0,0 +1,30 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionKey < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+ end
16
+
17
+ # def apply_to(seq)
18
+ #
19
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
20
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name} . BEGIN: #{@start_pos} END: #{@end_pos} "
21
+ #
22
+ # end
23
+
24
+ def apply_decoration(char)
25
+ return char.on_yellow
26
+
27
+ end
28
+
29
+
30
+ end
@@ -0,0 +1,32 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionLeftAdapter < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+
16
+ end
17
+ #
18
+ # def apply_to(seq)
19
+ #
20
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
21
+ # $LOG.debug " Applying #{self.class} . BEGIN: #{@start_pos} END: #{@end_pos} "
22
+ #
23
+ # end
24
+
25
+ def apply_decoration(char)
26
+ return char.magenta
27
+
28
+ # return char.magenta.negative
29
+ end
30
+
31
+
32
+ end
@@ -0,0 +1,17 @@
1
+ require "seqtrim_action"
2
+
3
+
4
+ class ActionLeftPrimer < SeqtrimAction
5
+
6
+ def initialize(start_pos,end_pos)
7
+ super(start_pos,end_pos)
8
+ @cut =true
9
+
10
+ end
11
+
12
+ def apply_decoration(char)
13
+ return char.blue.underline
14
+ end
15
+
16
+
17
+ end
@@ -0,0 +1,30 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionLinker < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =false
15
+ end
16
+
17
+ # def apply_to(seq)
18
+ #
19
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
20
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name} . BEGIN: #{@start_pos} END: #{@end_pos} "
21
+ #
22
+ # end
23
+
24
+ def apply_decoration(char)
25
+ return char.underline
26
+
27
+ end
28
+
29
+
30
+ end
@@ -0,0 +1,30 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionLowComplexity < SeqtrimAction
11
+ def initialize(start_pos,end_pos)
12
+ super(start_pos,end_pos)
13
+ @cut = false
14
+ @informative = true
15
+ end
16
+
17
+ # def apply_to(seq)
18
+ #
19
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
20
+ # $LOG.debug " Applying #{self.class} "
21
+ #
22
+ # end
23
+
24
+
25
+ def apply_decoration(char)
26
+ return char.red.bold
27
+ end
28
+
29
+
30
+ end
@@ -0,0 +1,31 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute PluginActionLowHighSize
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionLowHighSize < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =false
15
+
16
+ end
17
+
18
+ # def apply_to(seq)
19
+ #
20
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
21
+ # $LOG.debug " Applying #{self.class} to #{seq.seq_name}. This sequence will be ignored due to low or high size "
22
+ # #delete sequence if it was created
23
+ #
24
+ #
25
+ # end
26
+
27
+ def apply_decoration(char)
28
+ return char.on_magenta
29
+ end
30
+
31
+ end
@@ -0,0 +1,33 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute PluginActionLowHighSize
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionLowQuality < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =false
15
+
16
+ end
17
+
18
+ # def apply_to(seq)
19
+ #
20
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
21
+ # $LOG.debug " Applying #{self.class} to #{seq.seq_name} . This sequence will be ignored due to low quality "
22
+ # #delete sequence if it was created
23
+ #
24
+ #
25
+ # end
26
+
27
+
28
+ def apply_decoration(char)
29
+ return char.downcase.on_white
30
+ end
31
+
32
+
33
+ end
@@ -0,0 +1,30 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionMid < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+ end
16
+
17
+ # def apply_to(seq)
18
+ #
19
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
20
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name} . BEGIN: #{@start_pos} END: #{@end_pos} "
21
+ #
22
+ # end
23
+
24
+ def apply_decoration(char)
25
+ return char.yellow.bold
26
+
27
+ end
28
+
29
+
30
+ end
@@ -0,0 +1,29 @@
1
+ ########################################################
2
+ # Author: Almudena Bocinos Rioboo
3
+ #
4
+ ########################################################
5
+
6
+ require "seqtrim_action"
7
+
8
+
9
+ class ActionMultipleLinker < SeqtrimAction
10
+
11
+ def initialize(start_pos,end_pos)
12
+ super(start_pos,end_pos)
13
+ @cut =true
14
+ end
15
+
16
+ # def apply_to(seq)
17
+ #
18
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
19
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name} . BEGIN: #{@start_pos} END: #{@end_pos} "
20
+ #
21
+ # end
22
+
23
+ def apply_decoration(char)
24
+ return char.underline
25
+
26
+ end
27
+
28
+
29
+ end
@@ -0,0 +1,28 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute PluginPairedReads
7
+ # Inherit: Plugin
8
+ ########################################################
9
+ class ActionPairedReads < SeqtrimAction
10
+ def initialize(start_pos,end_pos)
11
+ super(start_pos,end_pos)
12
+ @cut =true
13
+
14
+ end
15
+
16
+
17
+ def apply_to(seq)
18
+ $LOG.debug "Applying #{self.class}"
19
+
20
+ #Storage the first and second subsequences
21
+ subseq1 = seq.seq_fasta[0,@start_pos-1]
22
+ subseq2 = seq.seq_fasta[@end_pos+1,seq.seq_fasta.length-1]
23
+ #$LOG.debug "\nSubsequence left: #{subseq1} \n Subsequence right: #{subseq2}}"
24
+
25
+ end
26
+
27
+
28
+ end
@@ -0,0 +1,29 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionPolyA < SeqtrimAction
11
+ def initialize(start_pos,end_pos)
12
+ super(start_pos,end_pos)
13
+ @cut =true
14
+ end
15
+
16
+ # def apply_to(seq)
17
+ #
18
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
19
+ # $LOG.debug " Applying #{self.class} "
20
+ #
21
+ # end
22
+
23
+
24
+ def apply_decoration(char)
25
+ return char.bold
26
+ end
27
+
28
+
29
+ end
@@ -0,0 +1,29 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionPolyT < SeqtrimAction
11
+ def initialize(start_pos,end_pos)
12
+ super(start_pos,end_pos)
13
+ @cut =true
14
+ end
15
+
16
+ # def apply_to(seq)
17
+ #
18
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
19
+ # $LOG.debug " Applying #{self.class} "
20
+ #
21
+ # end
22
+
23
+
24
+ def apply_decoration(char)
25
+ return char.bold
26
+ end
27
+
28
+
29
+ end
@@ -0,0 +1,32 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute PluginActionLowHighSize
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionRemAditArtifacts < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+
16
+ end
17
+
18
+ # def apply_to(seq)
19
+ #
20
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
21
+ # $LOG.debug " Applying #{self.class} to #{seq.seq_name} "
22
+ # #delete sequence if it was created
23
+ #
24
+ #
25
+ # end
26
+
27
+ def apply_decoration(char)
28
+ return char.yellow.negative
29
+ end
30
+
31
+
32
+ end
@@ -0,0 +1,29 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionRightAdapter < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+
16
+ end
17
+
18
+ # def apply_to(seq)
19
+ #
20
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
21
+ # $LOG.debug " Applying #{self.class}. BEGIN: #{@start_pos} END: #{@end_pos} "
22
+ #
23
+ # end
24
+
25
+ def apply_decoration(char)
26
+ return char.magenta
27
+ end
28
+
29
+ end
@@ -0,0 +1,25 @@
1
+ require "seqtrim_action"
2
+
3
+ class ActionRightPrimer < SeqtrimAction
4
+
5
+ def initialize(start_pos,end_pos)
6
+ super(start_pos,end_pos)
7
+ @cut =true
8
+
9
+ end
10
+ #
11
+ # def apply_to(seq)
12
+ #
13
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
14
+ # $LOG.debug " Applying #{self.class} . BEGIN: #{@start_pos} END: #{@end_pos} "
15
+ #
16
+ # end
17
+
18
+ def apply_decoration(char)
19
+ return char.blue.underline
20
+
21
+ # return char.magenta.negative
22
+ end
23
+
24
+
25
+ end
@@ -0,0 +1,32 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute ActionShortInserted
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionShortInsert < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ # @cut =true
15
+ @cut = false
16
+ @informative = true
17
+ end
18
+
19
+ # def apply_to(seq)
20
+ #
21
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
22
+ # $LOG.debug " Applying #{self.class}. ------ Error.Sequence is not good ------ . BEGIN: #{@start_pos} END: #{@end_pos} "
23
+ #
24
+ #
25
+ # end
26
+
27
+ def apply_decoration(char)
28
+ return char.on_red
29
+ end
30
+
31
+
32
+ end
@@ -0,0 +1,29 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionUnexpectedPolyT < SeqtrimAction
11
+ def initialize(start_pos,end_pos)
12
+ super(start_pos,end_pos)
13
+ @cut =true
14
+ end
15
+
16
+ # def apply_to(seq)
17
+ #
18
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
19
+ # $LOG.debug " Applying #{self.class} "
20
+ #
21
+ # end
22
+
23
+
24
+ def apply_decoration(char)
25
+ return char.bold
26
+ end
27
+
28
+
29
+ end
@@ -0,0 +1,31 @@
1
+ require "seqtrim_action"
2
+
3
+ ########################################################
4
+ # Author: Almudena Bocinos Rioboo
5
+ #
6
+ # Defines the main methods that are necessary to execute Plugin1
7
+ # Inherit: Plugin
8
+ ########################################################
9
+
10
+ class ActionUnexpectedVector < SeqtrimAction
11
+
12
+ def initialize(start_pos,end_pos)
13
+ super(start_pos,end_pos)
14
+ @cut =true
15
+
16
+ end
17
+
18
+ # def apply_to(seq)
19
+ #
20
+ # # seq.seq_fasta = seq.seq_fasta.slice(start_pos,end_pos)
21
+ # $LOG.debug " Applying #{self.class} to seq #{seq.seq_name}. BEGIN: #{@start_pos} END: #{@end_pos} "
22
+ #
23
+ # end
24
+
25
+ def apply_decoration(char)
26
+ return char.on_green
27
+ end
28
+
29
+
30
+
31
+ end