protk 1.2.6.pre5 → 1.3.0.pre1
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 +4 -4
- data/README.md +84 -45
- data/bin/add_retention_times.rb +9 -5
- data/bin/augustus_to_proteindb.rb +7 -11
- data/bin/interprophet.rb +28 -46
- data/bin/make_decoy.rb +16 -48
- data/bin/mascot_search.rb +57 -71
- data/bin/mascot_to_pepxml.rb +13 -26
- data/bin/msgfplus_search.rb +70 -107
- data/bin/omssa_search.rb +52 -109
- data/bin/peptide_prophet.rb +44 -119
- data/bin/pepxml_to_table.rb +24 -27
- data/bin/protein_prophet.rb +22 -82
- data/bin/protxml_to_gff.rb +22 -519
- data/bin/protxml_to_table.rb +2 -16
- data/bin/sixframe.rb +10 -32
- data/bin/tandem_search.rb +30 -403
- data/bin/tandem_to_pepxml.rb +43 -0
- data/bin/unimod_to_loc.rb +1 -1
- data/ext/{protk/decoymaker → decoymaker}/decoymaker.c +74 -21
- data/ext/decoymaker/extconf.rb +3 -0
- data/lib/protk/constants.rb +16 -2
- data/lib/protk/data/default_config.yml +2 -1
- data/lib/protk/data/tandem_gpm_defaults.xml +175 -0
- data/lib/protk/data/tandem_isb_kscore_defaults.xml +123 -0
- data/lib/protk/data/tandem_isb_native_defaults.xml +123 -0
- data/lib/protk/data/tandem_params.xml +17 -54
- data/lib/protk/fastadb.rb +2 -2
- data/lib/protk/prophet_tool.rb +1 -1
- data/lib/protk/protxml_to_gff_tool.rb +474 -0
- data/lib/protk/search_tool.rb +58 -103
- data/lib/protk/setup_rakefile.rake +9 -5
- data/lib/protk/tandem_search_tool.rb +256 -0
- data/lib/protk/tool.rb +85 -104
- data/lib/protk.rb +1 -6
- metadata +24 -103
- data/bin/annotate_ids.rb +0 -59
- data/bin/asapratio.rb +0 -27
- data/bin/blastxml_to_table.rb +0 -119
- data/bin/correct_omssa_retention_times.rb +0 -27
- data/bin/feature_finder.rb +0 -95
- data/bin/file_convert.rb +0 -164
- data/bin/generate_omssa_loc.rb +0 -42
- data/bin/gffmerge.rb +0 -208
- data/bin/libra.rb +0 -70
- data/bin/toppas_pipeline.rb +0 -84
- data/bin/uniprot_annotation.rb +0 -141
- data/bin/xls_to_table.rb +0 -52
- data/bin/xpress.rb +0 -27
- data/ext/protk/decoymaker/extconf.rb +0 -3
- data/ext/protk/simplealign/extconf.rb +0 -3
- data/lib/protk/biotools_excel_converter.rb +0 -60
- data/lib/protk/eupathdb_gene_information_table.rb +0 -158
- data/lib/protk/gapped_aligner.rb +0 -264
- data/lib/protk/protein_annotator.rb +0 -646
- data/lib/protk/spreadsheet_extensions.rb +0 -79
- 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
|