This class provides methods for reading and assigning chemical shifts. More...
#include <BALL/FORMAT/NMRStarFile.h>
This class provides methods for reading and assigning chemical shifts.
NMRStarFile class.
This class provides methods for reading and assigning experimental chemical shifts from NMRStar files to peptides. The nested class BALLToBMRPMapper creates a mapping between NMRStar file atoms and atoms of a chain either based on a trivial mapping
Example code:
BALL::System S; pdb >> S; Chain& chain = *(S.beginChain()); NMRStarFile nmr_file("NMRStarFile_test.bmr"); std::cout << nmr_file.getNumberOfSamples() << " " << mr_file.getNumberOfAtoms() << std::endl; std::cout << Peptides::GetSequence(chain) << std::endl; std::cout << nmr_file.getResidueSequence() << std::endl; NMRStarFile::BALLToBMRBMapper mapper(chain, nmr_file); mapper.createMapping("MKSTGIVRKVDELGRVVIPIELRRTLGIAEKDALEIYVDDEKIIL-KKYKPNMT", "AKSTGIVRKVDELGRVVIPIELRRTLGIAEKDALEIYVDDEKIILKK-YKPNMT"); std::cout << mapper.getNumberOfMismatches() << std::endl; nmr_file.assignShifts(mapper); ... std::cout << atom->getProperty(ShiftModule::PROPERTY__EXPERIMENTAL__SHIFT).getFloat() << std::endl; ...
NMRStarFile. This class is designed to read a NMR-Star-File. To read a file simpy use the NMRStarFile(char* filename)- Constructor. All useful data are extracted and stored. To get access to the data use getData().
Definition at line 66 of file NMRStarFile.h.
Definition at line 234 of file NMRStarFile.h.REMOTE.23414.h.
Definition at line 173 of file NMRStarFile.h.LOCAL.23414.h.
Definition at line 191 of file NMRStarFile.h.BASE.23414.h.
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE | |
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE | |
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE |
Definition at line 242 of file NMRStarFile.h.REMOTE.23414.h.
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE | |
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE | |
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE |
Definition at line 181 of file NMRStarFile.h.LOCAL.23414.h.
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE | |
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE | |
DIRECT_TYPE | |
INDIRECT_TYPE | |
UNKNOWN_TYPE | |
UNSET_TYPE |
Definition at line 199 of file NMRStarFile.h.BASE.23414.h.
enum BALL::NMRStarFile::ShiftReferenceTypes_ [private] |
internal enumeration used in readShiftReferences_()
Definition at line 316 of file NMRStarFile.h.REMOTE.23414.h.
enum BALL::NMRStarFile::ShiftReferenceTypes_ [private] |
internal enumeration used in readShiftReferences_()
Definition at line 245 of file NMRStarFile.h.LOCAL.23414.h.
enum BALL::NMRStarFile::ShiftReferenceTypes_ [private] |
internal enumeration used in readShiftReferences_()
Definition at line 267 of file NMRStarFile.h.BASE.23414.h.
BALL::NMRStarFile::NMRStarFile | ( | ) |
Standard constructor
BALL::NMRStarFile::NMRStarFile | ( | const String & | file_name, | |
File::OpenMode | open_mode = std::ios::in | |||
) | throw (Exception::FileNotFound) |
Detailed constuctor. Opens the given file and extracts all usefull data (Calls read ).
BALL::NMRStarFile::~NMRStarFile | ( | ) |
Destructor.
BALL::NMRStarFile::NMRStarFile | ( | ) |
Standard constructor
BALL::NMRStarFile::NMRStarFile | ( | const NMRStarFile & | f | ) | throw (Exception::FileNotFound) |
Copy constructor. If the file was open, it is closed. Then the file of f will be opend. All data already extracted in f is copied to this instance.
BALL::NMRStarFile::NMRStarFile | ( | const String & | file_name | ) | throw (Exception::FileNotFound, Exception::ParseError) |
Detailed constuctor. Opens the given file and extracts all usefull data.
BALL::NMRStarFile::~NMRStarFile | ( | ) |
BALL::NMRStarFile::NMRStarFile | ( | ) |
Standard constructor
BALL::NMRStarFile::NMRStarFile | ( | const String & | file_name | ) | throw (Exception::FileNotFound, Exception::ParseError) |
Detailed constuctor. Opens the given file and extracts all usefull data.
BALL::NMRStarFile::~NMRStarFile | ( | ) |
BALL::NMRStarFile::NMRStarFile | ( | ) |
Standard constructor
BALL::NMRStarFile::NMRStarFile | ( | const NMRStarFile & | f | ) | throw (Exception::FileNotFound) |
Copy constructor. If the file was open, it is closed. Then the file of f will be openeed. All data already extracted in f is copied to this instance.
BALL::NMRStarFile::NMRStarFile | ( | const String & | file_name, | |
File::OpenMode | open_mode = std::ios::in | |||
) | throw (Exception::FileNotFound) |
Detailed constuctor. Opens the given file and extracts all usefull data.
BALL::NMRStarFile::~NMRStarFile | ( | ) |
void BALL::NMRStarFile::addMonomericPolymer | ( | MonomericPolymer | mp | ) |
Add a Monomeric Polymer NOTE: if a poymer with the same name already exists, it will be overwritten!
bool BALL::NMRStarFile::assignShifts | ( | AtomContainer & | ac, | |
const String & | aligned_ball_sequence, | |||
const String & | aligned_nmrstar_sequence | |||
) |
Assign the shifts to the given AtomContainer as pointed out in the alignment. The alignmed sequences should be given in OneLetterCode, where '-' denotes a gap.
ac | AtomContainer to which the NMRStarfile's shift should be assigned. | |
aligned_ball_sequence | the aligned AtomContainers aminoacid sequence | |
aligned_nmrstar_sequence | the aligned aminoacid sequence of the NMRStar file atoms |
true
if reading the file was successful bool BALL::NMRStarFile::assignShifts | ( | BALLToBMRBMapper & | ball_to_bmrb_mapping | ) |
Assign the shifts to the given AtomContainer as denoted in the given {BALLToBMRBMapper}.
true
if reading the file was successful bool BALL::NMRStarFile::assignShifts_ | ( | BALLToBMRBMapper & | pdb_to_bmrb_mapping | ) | [private] |
Apply the shifts read into the AtomContainer as denoted in the mapping. We assume, that the file was already read! The shifts are stored as a property under the key {BALL::ShiftModule::PROPERTY__EXPERIMENTAL__SHIFT}
void BALL::NMRStarFile::clear | ( | ) | [virtual] |
Clear the object.
Reimplemented from BALL::LineBasedFile.
void BALL::NMRStarFile::clear | ( | ) | [virtual] |
Clear the object.
Reimplemented from BALL::LineBasedFile.
void BALL::NMRStarFile::clear | ( | ) | [virtual] |
Clear the object.
Reimplemented from BALL::LineBasedFile.
void BALL::NMRStarFile::clear | ( | ) | [virtual] |
Clear the object.
Reimplemented from BALL::LineBasedFile.
void BALL::NMRStarFile::findDependiencies_ | ( | ) | [private] |
find dependencies for the ChemicalUnits
const std::vector<NMRAtomDataSet>& BALL::NMRStarFile::getData | ( | ) | const |
Get the extracted data for the atoms.
const std::vector<NMRAtomDataSet>& BALL::NMRStarFile::getData | ( | ) | const |
Get the extracted data for the atoms.
const std::vector<NMRAtomDataSet>& BALL::NMRStarFile::getData | ( | ) | const |
Get the extracted data for the atoms.
const EntryInformation& BALL::NMRStarFile::getEntryInformation | ( | ) | const [inline] |
Definition at line 201 of file NMRStarFile.h.REMOTE.23414.h.
const EntryInformation& BALL::NMRStarFile::getEntryInformation | ( | ) | const [inline] |
Get the entry information
Definition at line 601 of file NMRStarFile.h.
const MolecularSystem& BALL::NMRStarFile::getMolecularInformation | ( | ) | const [inline] |
Get the molecular information
Definition at line 605 of file NMRStarFile.h.
const NMRStarFile::MonomericPolymer& BALL::NMRStarFile::getMonomericPolymer | ( | const String & | name | ) | const throw (Exception::OutOfRange) |
NMRStarFile::MonomericPolymer& BALL::NMRStarFile::getMonomericPolymer | ( | const String & | name | ) | throw (Exception::OutOfRange) |
Get the MonomericPolymer-information by name Throws exception OutOfRange
vector<MonomericPolymer> BALL::NMRStarFile::getMonomericPolymers | ( | ) | const [inline] |
Get all Monomeric Polymers.
Definition at line 706 of file NMRStarFile.h.
const std::vector<NMRAtomDataSet>& BALL::NMRStarFile::getNMRData | ( | ) | const |
Get the extracted data for the atoms
const NMRSpectrometer& BALL::NMRStarFile::getNMRSpectrometer | ( | Position | i | ) | const |
Get the i-th spectrometer.
NMRSpectrometer& BALL::NMRStarFile::getNMRSpectrometer | ( | Position | i | ) |
Get the i-th spectrometer.
const NMRSpectrometer& BALL::NMRStarFile::getNMRSpectrometerByName | ( | String | name | ) | const |
Get the spectrometer by its SaveFrame name.
NMRSpectrometer& BALL::NMRStarFile::getNMRSpectrometerByName | ( | String | name | ) |
Get the spectrometer by its SaveFrame name.
Get the spectrometer field strength.
Get the spectrometer manufacturer.
const std::vector<NMRSpectrometer>& BALL::NMRStarFile::getNMRSpectrometers | ( | ) | const [inline] |
Get the spectrometers.
Definition at line 674 of file NMRStarFile.h.
std::vector<NMRSpectrometer>& BALL::NMRStarFile::getNMRSpectrometers | ( | ) | [inline] |
Get the spectrometers.
Definition at line 672 of file NMRStarFile.h.
Size BALL::NMRStarFile::getNumberOfAtoms | ( | ) | const |
Get the maiximum number of atoms in all shift sets
Size BALL::NMRStarFile::getNumberOfAtoms | ( | ) | const |
Get the maiximum number of atoms in all shift sets
Size BALL::NMRStarFile::getNumberOfAtoms | ( | ) | const |
Get the maiximum number of atoms in all shift sets
Size BALL::NMRStarFile::getNumberOfAtoms | ( | ) | const |
Return the maximum number of atoms in all shift sets
Size BALL::NMRStarFile::getNumberOfMonomericPolymers | ( | ) | const [inline] |
Get the number of monomeric polymers in the file.
Definition at line 703 of file NMRStarFile.h.
Size BALL::NMRStarFile::getNumberOfNMRSpectrometers | ( | ) | const [inline] |
Get the number of nmr spectrometers.
Definition at line 677 of file NMRStarFile.h.
Size BALL::NMRStarFile::getNumberOfSampleConditions | ( | ) | const [inline] |
Get the number of sample conditions.
Definition at line 622 of file NMRStarFile.h.
Size BALL::NMRStarFile::getNumberOfSamples | ( | ) | const [inline] |
Get the number of samples.
Definition at line 637 of file NMRStarFile.h.
Size BALL::NMRStarFile::getNumberOfShiftReferenceSets | ( | ) | const [inline] |
Get the number of shift reference sets.
Definition at line 658 of file NMRStarFile.h.
Size BALL::NMRStarFile::getNumberOfShiftsAssigned | ( | ) | const [inline] |
Return the number of atoms assigned a chemical shift
Definition at line 593 of file NMRStarFile.h.
Get the sequence of residues of the i-th monomeric polymer in the file.
This method automatically compares the i-th monomeric_polymers' residue sequence with the actual stored NMR shift data. If there is a mismatch, a warning is given! If there is a mismatch or there is no monomeric_polymers residue sequence an empty.
Get the sample with name label. If no sample with name label exist a dummy sample is returned.
Get the i-th sample. If i is out of size a dummy sample is returned.
const SampleCondition& BALL::NMRStarFile::getSampleCondition | ( | Position | i | ) | const [inline] |
Get the i-th SampleCondition.
Definition at line 619 of file NMRStarFile.h.
SampleCondition& BALL::NMRStarFile::getSampleCondition | ( | Position | i | ) | [inline] |
Get the i-th SampleCondition.
Definition at line 616 of file NMRStarFile.h.
const SampleCondition& BALL::NMRStarFile::getSampleConditionByName | ( | String | name | ) | const |
Get a SampleCondition by its SaveFrame name
SampleCondition& BALL::NMRStarFile::getSampleConditionByName | ( | String | name | ) |
Get a SampleCondition by its SaveFrame name
std::vector<SampleCondition>& BALL::NMRStarFile::getSampleConditions | ( | ) | [inline] |
Get the sample conditions.
Definition at line 628 of file NMRStarFile.h.
const std::vector<SampleCondition>& BALL::NMRStarFile::getSampleConditions | ( | ) | const [inline] |
Get the sample conditions.
Definition at line 625 of file NMRStarFile.h.
std::vector<Sample> BALL::NMRStarFile::getSamples | ( | ) | const [inline] |
Get the samples.
Definition at line 633 of file NMRStarFile.h.
const ShiftReferenceSet& BALL::NMRStarFile::getShiftReferenceSet | ( | Position | i | ) | const [inline] |
Get the i-th shift reference set.
Definition at line 663 of file NMRStarFile.h.
ShiftReferenceSet& BALL::NMRStarFile::getShiftReferenceSet | ( | Position | i | ) | [inline] |
Get the i-th shift reference set.
Definition at line 661 of file NMRStarFile.h.
ShiftReferenceSet& BALL::NMRStarFile::getShiftReferenceSetByName | ( | String | name | ) |
Get a ShiftReferenceSet by its SaveFrame name.
const ShiftReferenceSet& BALL::NMRStarFile::getShiftReferenceSetByName | ( | String | name | ) | const |
Get a ShiftReferenceSet by its SaveFrame name.
const std::vector<ShiftReferenceSet>& BALL::NMRStarFile::getShiftReferenceSets | ( | ) | const [inline] |
Get the shift reference sets.
Definition at line 655 of file NMRStarFile.h.
std::vector<ShiftReferenceSet>& BALL::NMRStarFile::getShiftReferenceSets | ( | ) | [inline] |
Get the shift reference sets.
Definition at line 653 of file NMRStarFile.h.
bool BALL::NMRStarFile::hasCshifts | ( | ) | const [inline] |
Check, whether this NMRFile provides carbon shifts.
Definition at line 739 of file NMRStarFile.h.
bool BALL::NMRStarFile::hasHshifts | ( | ) | const [inline] |
Check, whether this NMRFile provides hydrogen shifts.
Definition at line 736 of file NMRStarFile.h.
Check if polymer name is already stored is a monomeric polymer.
bool BALL::NMRStarFile::hasNshifts | ( | ) | const [inline] |
Check, whether this NMRFile provides nitrogen shifts.
Definition at line 742 of file NMRStarFile.h.
Return true if the file contains a sample named label, false otherwise.
static void BALL::NMRStarFile::initializeReferenceOptions_ | ( | ) | [static, private] |
initialize the referenceOptions
static void BALL::NMRStarFile::initializeReferenceOptions_ | ( | ) | [static, private] |
initialize the referenceOptions
static void BALL::NMRStarFile::initializeReferenceOptions_ | ( | ) | [static, private] |
initialize the referenceOptions
Check if label is a monomeric polymer.
Returns true if a monomer with name chemical_unit_label exists, false otherwise.
check whether the given String denotes a non-available value
bool BALL::NMRStarFile::operator!= | ( | const NMRStarFile & | f | ) |
Inequality operator Test if both instances point to different files.
bool BALL::NMRStarFile::operator!= | ( | const NMRStarFile & | f | ) |
Inequality operator Test if both instances point to different files.
bool BALL::NMRStarFile::operator!= | ( | const NMRStarFile & | f | ) |
Inequality operator Test if both instances point to different files.
bool BALL::NMRStarFile::operator!= | ( | const NMRStarFile & | f | ) |
Inequality operator Test if both instances point to different files.
const NMRStarFile& BALL::NMRStarFile::operator= | ( | const NMRStarFile & | f | ) |
Assignment operator.
const NMRStarFile& BALL::NMRStarFile::operator= | ( | const NMRStarFile & | f | ) |
Assignment operator.
const NMRStarFile& BALL::NMRStarFile::operator= | ( | const NMRStarFile & | f | ) |
Assignment operator.
bool BALL::NMRStarFile::operator== | ( | const NMRStarFile & | f | ) |
Equality operator. Test if both instances point to the same file.
bool BALL::NMRStarFile::operator== | ( | const NMRStarFile & | f | ) |
Equality operator. Test if both instances point to the same file.
bool BALL::NMRStarFile::operator== | ( | const NMRStarFile & | f | ) |
Equality operator. Test if both instances point to the same file.
bool BALL::NMRStarFile::operator== | ( | const NMRStarFile & | f | ) |
Equality operator. Test if both instances point to the same file.
NMRAtomData BALL::NMRStarFile::processShiftLine_ | ( | ) | throw (Exception::ParseError) [private] |
function to extract the data from a chemical shift line
NMRAtomData BALL::NMRStarFile::processShiftLine_ | ( | ) | throw (Exception::ParseError) [private] |
function to extract the data from a chemical shift line
bool BALL::NMRStarFile::read | ( | ) | throw (Exception::ParseError) [virtual] |
Read a NMRStarFile.
Reimplemented from BALL::CIFFile.
bool BALL::NMRStarFile::read | ( | AtomContainer & | ac | ) |
bool BALL::NMRStarFile::read | ( | ) | throw (Exception::ParseError) [virtual] |
Read an NMRStarFile.
Reimplemented from BALL::CIFFile.
void BALL::NMRStarFile::readEntryInformation_ | ( | ) | throw (Exception::ParseError, Exception::InvalidFormat) [private] |
function to extract the data from a chemical shift line
reads the number of chemical shifts
void BALL::NMRStarFile::readEntryInformation_ | ( | ) | throw (Exception::ParseError, Exception::InvalidFormat) [private] |
reads the number of chemical shifts
void BALL::NMRStarFile::readEntryInformation_ | ( | ) | throw (Exception::ParseError, Exception::InvalidFormat) [private] |
reads the number of chemical shifts
void BALL::NMRStarFile::readEntryInformation_ | ( | ) | [private] |
reads the number of chemical shifts
void BALL::NMRStarFile::readMolSystem_ | ( | ) | [private] |
reads the molecular system name
void BALL::NMRStarFile::readMolSystem_ | ( | ) | [private] |
reads the molecular system name
void BALL::NMRStarFile::readMolSystem_ | ( | ) | [private] |
reads the molecular system name
void BALL::NMRStarFile::readMolSystem_ | ( | ) | [private] |
reads the molecular system name
void BALL::NMRStarFile::readMonomericPolymers_ | ( | ) | [private] |
read the MonomericPolymers
void BALL::NMRStarFile::readNMRSpectrometer_ | ( | ) | [private] |
reads the NMR spectrometer data
void BALL::NMRStarFile::readSampleConditions_ | ( | ) | [private] |
reads the sample conditions
void BALL::NMRStarFile::readSampleConditions_ | ( | ) | [private] |
reads the sample conditions
void BALL::NMRStarFile::readSampleConditions_ | ( | ) | [private] |
reads the sample conditions
void BALL::NMRStarFile::readSampleConditions_ | ( | ) | [private] |
reads the sample conditions
void BALL::NMRStarFile::readSamples_ | ( | ) | [private] |
read the samples
void BALL::NMRStarFile::readShiftReferences_ | ( | ) | [private] |
reads the shift references
void BALL::NMRStarFile::readShiftReferences_ | ( | ) | [private] |
reads the shift references
void BALL::NMRStarFile::readShiftReferences_ | ( | ) | [private] |
reads the shift references
void BALL::NMRStarFile::readShiftReferences_ | ( | ) | [private] |
reads the shift references
void BALL::NMRStarFile::readShifts_ | ( | ) | throw (Exception::ParseError) [private] |
reads the shift datas
void BALL::NMRStarFile::readShifts_ | ( | ) | throw (Exception::ParseError) [private] |
reads the shift datas
void BALL::NMRStarFile::readShifts_ | ( | ) | throw (Exception::ParseError) [private] |
reads the shift datas
void BALL::NMRStarFile::readShifts_ | ( | ) | [private] |
reads the shift datas
void BALL::NMRStarFile::setSpecialCharacters_ | ( | String | characters | ) | [private] |
set the characters denoting single non-available values
std::vector< NMRAtomDataSet > BALL::NMRStarFile::atom_data_sets_ [private] |
the data for the atoms is stored here
Definition at line 837 of file NMRStarFile.h.
Definition at line 875 of file NMRStarFile.h.
Definition at line 872 of file NMRStarFile.h.
Sample BALL::NMRStarFile::dummy_sample_ [private] |
Definition at line 866 of file NMRStarFile.h.
Definition at line 863 of file NMRStarFile.h.
SaveFrame BALL::NMRStarFile::dummy_saveframe_ [private] |
Definition at line 860 of file NMRStarFile.h.
Definition at line 869 of file NMRStarFile.h.
the general entry data
Definition at line 831 of file NMRStarFile.h.
static const float BALL::NMRStarFile::FLOAT_VALUE_NA [static] |
Definition at line 72 of file NMRStarFile.h.
bool BALL::NMRStarFile::has_C_shifts_ [private] |
Definition at line 856 of file NMRStarFile.h.
bool BALL::NMRStarFile::has_H_shifts_ [private] |
stores, which shifts are given in the file
Definition at line 855 of file NMRStarFile.h.
bool BALL::NMRStarFile::has_N_shifts_ [private] |
Definition at line 857 of file NMRStarFile.h.
const int BALL::NMRStarFile::INT_VALUE_NA [static] |
Definition at line 73 of file NMRStarFile.h.
the system information
Definition at line 834 of file NMRStarFile.h.
vector<MonomericPolymer> BALL::NMRStarFile::monomeric_polymers_ [private] |
Monomeric Polymer information.
Definition at line 852 of file NMRStarFile.h.
std::vector<NMRSpectrometer> BALL::NMRStarFile::nmr_spectrometers_ [private] |
the data of nmr spectrometers
Definition at line 849 of file NMRStarFile.h.
the number of assigned shifts during the last call of assignShifts()
Definition at line 828 of file NMRStarFile.h.
Size BALL::NMRStarFile::number_of_shift_sets_ [private] |
the number of shift data sets
Definition at line 825 of file NMRStarFile.h.
Size BALL::NMRStarFile::number_of_shifts_ [private] |
the number of shift data
the number of shift data -> todo: not sure what is ment with this!
Definition at line 249 of file NMRStarFile.h.BASE.23414.h.
static const Position BALL::NMRStarFile::POSITION_VALUE_NA [static] |
Definition at line 75 of file NMRStarFile.h.
static std::vector< String > BALL::NMRStarFile::reference_options_ [static, private] |
contains Strings with the used reference options
Definition at line 264 of file NMRStarFile.h.BASE.23414.h.
std::vector< SampleCondition > BALL::NMRStarFile::sample_conditions_ [private] |
the data for different sample sets
Definition at line 840 of file NMRStarFile.h.
std::vector<Sample> BALL::NMRStarFile::samples_ [private] |
the samples
Definition at line 843 of file NMRStarFile.h.
std::vector< ShiftReferenceSet > BALL::NMRStarFile::shift_references_ [private] |
the data for shift references
Definition at line 846 of file NMRStarFile.h.
String BALL::NMRStarFile::special_characters_ [private] |
characters, that denote non-available values
Definition at line 878 of file NMRStarFile.h.
String BALL::NMRStarFile::system_name_ [private] |
name of the molecular system
Definition at line 261 of file NMRStarFile.h.BASE.23414.h.
bool BALL::NMRStarFile::valid_ [private] |
Definition at line 822 of file NMRStarFile.h.