Top Level Namespace
Defined Under Namespace
Modules: Ms
Classes: Hash
Instance Method Summary
collapse
Instance Method Details
#basename(file) ⇒ Object
28
29
30
31
32
|
# File 'bin/peptide_hit_qvalues_to_spectral_counts_table.rb', line 28
def basename(file)
base = file.chomp(File.extname(file))
base=base.chomp(File.extname(base)) if File.extname(base) == '.phq'
base
end
|
#putsv(*args) ⇒ Object
22
23
24
25
26
|
# File 'bin/peptide_hit_qvalues_to_spectral_counts_table.rb', line 22
def putsv(*args)
if $VERBOSE
puts(*args) ; $stdout.flush
end
end
|
#write_subset(sample_to_pephits, outfile = "peptidecentric_subset.yml") ⇒ Object
61
62
63
64
65
66
67
68
69
70
71
|
# File 'bin/peptide_hit_qvalues_to_spectral_counts_table.rb', line 61
def write_subset(sample_to_pephits, outfile="peptidecentric_subset.yml")
aaseqs_to_prots = {}
sample_to_pephits.map(&:last).flatten(1).each do |pephit|
aaseqs_to_prots[pephit.aaseq] = pephit.proteins.map(&:id)
end
File.open(outfile,'w') do |out|
aaseqs_to_prots.each do |k,v|
out.puts(%Q{#{k}: #{v.join("\t") }})
end
end
end
|