protk 1.2.6.pre5 → 1.3.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -45
  3. data/bin/add_retention_times.rb +9 -5
  4. data/bin/augustus_to_proteindb.rb +7 -11
  5. data/bin/interprophet.rb +28 -46
  6. data/bin/make_decoy.rb +16 -48
  7. data/bin/mascot_search.rb +57 -71
  8. data/bin/mascot_to_pepxml.rb +13 -26
  9. data/bin/msgfplus_search.rb +70 -107
  10. data/bin/omssa_search.rb +52 -109
  11. data/bin/peptide_prophet.rb +44 -119
  12. data/bin/pepxml_to_table.rb +24 -27
  13. data/bin/protein_prophet.rb +22 -82
  14. data/bin/protxml_to_gff.rb +22 -519
  15. data/bin/protxml_to_table.rb +2 -16
  16. data/bin/sixframe.rb +10 -32
  17. data/bin/tandem_search.rb +30 -403
  18. data/bin/tandem_to_pepxml.rb +43 -0
  19. data/bin/unimod_to_loc.rb +1 -1
  20. data/ext/{protk/decoymaker → decoymaker}/decoymaker.c +74 -21
  21. data/ext/decoymaker/extconf.rb +3 -0
  22. data/lib/protk/constants.rb +16 -2
  23. data/lib/protk/data/default_config.yml +2 -1
  24. data/lib/protk/data/tandem_gpm_defaults.xml +175 -0
  25. data/lib/protk/data/tandem_isb_kscore_defaults.xml +123 -0
  26. data/lib/protk/data/tandem_isb_native_defaults.xml +123 -0
  27. data/lib/protk/data/tandem_params.xml +17 -54
  28. data/lib/protk/fastadb.rb +2 -2
  29. data/lib/protk/prophet_tool.rb +1 -1
  30. data/lib/protk/protxml_to_gff_tool.rb +474 -0
  31. data/lib/protk/search_tool.rb +58 -103
  32. data/lib/protk/setup_rakefile.rake +9 -5
  33. data/lib/protk/tandem_search_tool.rb +256 -0
  34. data/lib/protk/tool.rb +85 -104
  35. data/lib/protk.rb +1 -6
  36. metadata +24 -103
  37. data/bin/annotate_ids.rb +0 -59
  38. data/bin/asapratio.rb +0 -27
  39. data/bin/blastxml_to_table.rb +0 -119
  40. data/bin/correct_omssa_retention_times.rb +0 -27
  41. data/bin/feature_finder.rb +0 -95
  42. data/bin/file_convert.rb +0 -164
  43. data/bin/generate_omssa_loc.rb +0 -42
  44. data/bin/gffmerge.rb +0 -208
  45. data/bin/libra.rb +0 -70
  46. data/bin/toppas_pipeline.rb +0 -84
  47. data/bin/uniprot_annotation.rb +0 -141
  48. data/bin/xls_to_table.rb +0 -52
  49. data/bin/xpress.rb +0 -27
  50. data/ext/protk/decoymaker/extconf.rb +0 -3
  51. data/ext/protk/simplealign/extconf.rb +0 -3
  52. data/lib/protk/biotools_excel_converter.rb +0 -60
  53. data/lib/protk/eupathdb_gene_information_table.rb +0 -158
  54. data/lib/protk/gapped_aligner.rb +0 -264
  55. data/lib/protk/protein_annotator.rb +0 -646
  56. data/lib/protk/spreadsheet_extensions.rb +0 -79
  57. data/lib/protk/xtandem_defaults.rb +0 -11
@@ -1,79 +0,0 @@
1
- require 'spreadsheet'
2
- # Add a method to the Spreadsheet::Worksheet class to insert a column
3
- class Spreadsheet::Worksheet < Object
4
- def insert_column(col,index)
5
- # First check to see if the length of the column equals the number of rows
6
- if ( col.length!=self.rows.length && self.rows.length!=0)
7
- raise "The length of column #{col.length} does not equal the number of rows #{self.rows.length}"
8
- end
9
- if ( col.class!=Array || index.class!=Fixnum)
10
- raise "Wrong arguments. Requires a column array and an integer index"
11
- end
12
-
13
- # Check for special case where there are no rows yet and if so then insert as new rows
14
- if ( self.rows.length==0)
15
- col.each_index { |i|
16
- self.insert_row(i,[col[i]])
17
- }
18
- else
19
- # Insert the column row by row. Probably inefficient but it works
20
- rowi=0
21
- self.each {|row|
22
- row.insert(index,col[rowi])
23
- rowi+=1
24
- }
25
- end
26
- end
27
- end
28
-
29
- class Spreadsheet::Workbook < Object
30
-
31
-
32
- # creates an output excel file (returning the workbook object), transcribing all original content up to the given number of rows
33
- # Throws an error if the input contains more than 1 worksheet
34
- #
35
- def copyBook(numrows=0)
36
-
37
- if ( !numrows )
38
- numrows=0
39
- end
40
-
41
- # Create a new workbook from scratch for writing
42
- outputBook = Spreadsheet::Workbook.new
43
- outputSheet = outputBook.create_worksheet
44
-
45
- # There should only be one worksheet in the input workbook
46
- worksheets=self.worksheets
47
- if ( self.worksheets.length != 1 )
48
- puts "More than one worksheet in this excel file. This script only operates on single worksheets"
49
- end
50
-
51
- # Get the worksheet
52
- inputSheet=self.worksheet 0
53
-
54
- # Figure out how many rows to convert if not specified
55
- if ( numrows==0 || numrows > (inputSheet.row_count+1))
56
- numrows=inputSheet.row_count
57
- end
58
-
59
-
60
- # Transcribe everything from the old worksheet to the new one
61
- puts "Creating new spreadsheet with #{numrows} rows"
62
- (0...[numrows,inputSheet.row_count].min).each { |r|
63
-
64
- outputSheet.insert_row(r,inputSheet.row(r))
65
-
66
- newRow=outputSheet.row(r)
67
-
68
- # After inserting the row make sure it doesn't contain any nil values
69
- newRow.each_index { |ci|
70
- if ( newRow[ci]==nil)
71
- newRow[ci]=""
72
- end
73
- }
74
- }
75
- outputBook
76
- end
77
-
78
-
79
- end
@@ -1,11 +0,0 @@
1
- require 'libxml'
2
- include LibXML
3
-
4
- class XTandemDefaults
5
- attr :path
6
- attr :taxonomy_path
7
- def initialize
8
- @path="#{File.dirname(__FILE__)}/data/tandem_params.xml"
9
- @taxonomy_path="#{File.dirname(__FILE__)}/data/taxonomy_template.xml"
10
- end
11
- end