Finnigan
view release on metacpan or search on metacpan
bin/uf-mzml view on Meta::CPAN
$buf = '';
foreach ( @tic ) {
$buf .= pack("f<", $_);
}
$encoded_tic = encode_base64($buf, '');
}
}
#------------------------------------------------------------------------------------------
# This is a reasonably good point to start generating the output. We
# know everything about the data, but haven't started reading the scan
# data itself
my $parent_scan_data; # for looking up the precursor ion for each of
# the dependent MS2 scans
my %scan_data;
my $x = XML::Generator->new(
pretty => 2,
# conformance => 'strict',
namespace => ['http://psi.hupo.org/ms/mzml'],
);
# XML-related stuff ----------------------------------------------------
tie my %cvAttr1, 'Tie::IxHash';
%cvAttr1 = (
id => 'MS',
fullName => 'Proteomics Standards Initiative Mass Spectrometry Ontology',
version => '3.4.1',
URI => 'http://psidev.cvs.sourceforge.net/*checkout*/psidev/psi/psi-ms/mzML/controlledVocabulary/psi-ms.obo'
);
tie my %cvAttr2, 'Tie::IxHash';
%cvAttr2 = (
id => 'UO',
fullName => 'Unit Ontology',
version => '18:03:2011',
URI => 'http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/unit.obo'
);
# File content description ---------------------------------------------
tie my %fileContentAttr1, 'Tie::IxHash';
%fileContentAttr1 = (
cvRef => 'MS',
accession => 'MS:1000579',
name => 'MS1 spectrum',
value => '',
);
tie my %fileContentAttr2, 'Tie::IxHash';
%fileContentAttr2 = (
cvRef => 'MS',
accession => 'MS:1000580',
name => 'MSn spectrum',
value => '',
);
# Source File list ------------------------------------------------------
tie my %sourceFileAttr, 'Tie::IxHash';
my @path = split m{[\\/]}, $seq_row->file_name;
my $name = pop @path;
my $path = $seq_row->path || join "/", @path;
%sourceFileAttr = (
id => 'RAW1',
name => $name,
location => "file:///$path"
);
tie my %sourceFileAttr1, 'Tie::IxHash';
%sourceFileAttr1 = (
cvRef => 'MS',
accession => 'MS:1000768',
name => 'Thermo nativeID format',
value => ''
);
tie my %sourceFileAttr2, 'Tie::IxHash';
%sourceFileAttr2 = (
cvRef => 'MS',
accession => 'MS:1000563',
name => 'Thermo RAW file',
value => ''
);
tie my %sourceFileAttr3, 'Tie::IxHash';
%sourceFileAttr3 = (
cvRef => 'MS',
accession => 'MS:1000569',
name => 'SHA-1',
value => $digest
);
# InstID (referenceableParamGroupList) -------------------------------------
tie my %instModelCvAttr, 'Tie::IxHash';
my $model = decode_string($inst->model);
%instModelCvAttr = (
cvRef => 'MS',
accession => $thermoInstId{$model} || 'MS:0000000',
name => $model,
value => ''
);
tie my %instSerialNoCvAttr, 'Tie::IxHash';
%instSerialNoCvAttr = (
cvRef => 'MS',
accession => 'MS:1000529',
name => 'instrument serial number',
value => decode_string($inst->serial_number)
);
# Acquisition Software ------------------------------------------
tie my %softwareAttr1, 'Tie::IxHash';
%softwareAttr1 = (
id => 'Xcalibur', # What elese? It does not name itself in the file.
version => decode_string($inst->software_version),
);
tie my %softwareCvAttr1, 'Tie::IxHash';
( run in 0.779 second using v1.01-cache-2.11-cpan-71847e10f99 )