GetFieldIndicies() public static method

public static GetFieldIndicies ( string fieldName, string &condensedFieldName ) : List
fieldName string
condensedFieldName string
return List
Esempio n. 1
0
        public override void SetValue(string fieldName, string value)
        {
            if (MzTab.NullFieldText.Equals(value))
            {
                return;
            }

            switch (fieldName)
            {
            case Fields.Identifier:
                Identifiers = value.Split('|').ToList(); return;

            case Fields.ChemicalFormula:
                ChemicalFormula = new ChemicalFormula(value); return;

            case Fields.Smiles:
                Smiles = value; return;

            case Fields.InChIKey:
                InChIKeys = value.Split('|').ToList(); return;

            case Fields.Description:
                Description = value; return;

            case Fields.ExperimentMZ:
                ExperimentalMZ = double.Parse(value); return;

            case Fields.TheoreticalMZ:
                TheoreticalMZ = double.Parse(value); return;

            case Fields.Charge:
                Charge = int.Parse(value); return;

            case Fields.RetentionTime:
                RetentionTimes = value.Split('|').Select(double.Parse).ToList(); return;

            case Fields.TaxID:
                TaxID = int.Parse(value); return;

            case Fields.Species:
                Species = value; return;

            case Fields.Database:
                Database = value; return;

            case Fields.DatabaseVersion:
                DatabaseVersion = value; return;

            case Fields.Reliability:
                Reliability = (MzTab.MetabolomicsReliabilityScore) int.Parse(value); return;

            case Fields.Uri:
                Uri = new Uri(value); return;

            case Fields.SpectralReference:
                SpectralReference = value; return;

            case Fields.SearchEngine:
                SearchEngines = value.Split('|').Select(v => new CVParamater(v)).ToList(); return;

            case Fields.Modifications:
                Modifications = value; return;
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                switch (condensedFieldName)
                {
                case Fields.BestSearchEngineScores:
                    SetListValue(ref _bestSearchEngineScores, indices[0], double.Parse(value)); return;

                case Fields.SearchEngineScorePerMsRun:
                    SetListValue(ref _searchEngineScorePerMsRun, indices[0], indices[1], double.Parse(value)); return;

                case Fields.AbundanceAssay:
                    SetListValue(ref _abundanceAssays, indices[0], double.Parse(value)); return;

                case Fields.AbundanceStudyVariable:
                    SetListValue(ref _abundanceStudyVariables, indices[0], double.Parse(value)); return;

                case Fields.AbundanceStDevStudyVariable:
                    SetListValue(ref _abundanceStdevStudyVariables, indices[0], double.Parse(value)); return;

                case Fields.AbudnanceStdErrorStudyVariable:
                    SetListValue(ref _abundanceStandardErrorStudyVariables, indices[0], double.Parse(value)); return;
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                SetOptionalData(fieldName, value); return;
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 2
0
        public override void SetValue(string fieldName, string value)
        {
            if (MzTab.NullFieldText.Equals(value))
            {
                return;
            }

            switch (fieldName)
            {
            case Fields.Accession:
                Accession = value;
                return;

            case Fields.Description:
                Description = value;
                return;

            case Fields.Database:
                Database = value;
                return;

            case Fields.DatabaseVersion:
                DatabaseVersion = value;
                return;

            case Fields.TaxID:
                TaxID = int.Parse(value);
                return;

            case Fields.Species:
                Species = value;
                return;

            case Fields.Modifications:
                Modificiations = value;
                return;

            case Fields.SearchEngine:
                SearchEngines = value.Split('|').Select(datum => (CVParamater)datum).ToList();
                return;

            case Fields.Reliability:
                Reliability = (MzTab.ReliabilityScore) int.Parse(value);
                return;

            case Fields.AmbiguityMembers:
                AmbiguityMembers = value.Split(',').ToList();
                return;

            case Fields.Coverage:
                Coverage = double.Parse(value, CultureInfo.CurrentCulture);
                return;

            case Fields.Uri:
                Uri = new Uri(value);
                return;

            case Fields.GoTerms:
                GoTerms = value.Split('|').Select(datum => datum).ToList();
                return;
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                double tempDbl;
                switch (condensedFieldName)
                {
                case Fields.SearchEngine:
                    SetListValue(ref _searchEngines, indices[0], new CVParamater(value));
                    return;

                case Fields.BestSearchEngineScore:
                    SetListValue(ref _bestSearchEngineScores, indices[0], double.Parse(value, CultureInfo.CurrentCulture));
                    return;

                case Fields.AbundancePerAssay:
                    SetListValue(ref _abundanceAssays, indices[0], double.Parse(value, CultureInfo.CurrentCulture));
                    return;

                case Fields.AbundanceStudyVariables:
                    SetListValue(ref _abundanceStudyVariables, indices[0], double.Parse(value, CultureInfo.CurrentCulture));
                    return;

                case Fields.AbundanceStdevStudyVariables:
                    SetListValue(ref _abundanceStdevStudyVariables, indices[0], double.Parse(value, CultureInfo.CurrentCulture));
                    return;

                case Fields.AbundanceStandardErrorStudyVariables:
                    SetListValue(ref _abundanceStandardErrorStudyVariables, indices[0], double.Parse(value, CultureInfo.CurrentCulture));
                    return;

                case Fields.SearchEngineScoreMsRun:
                    SetListValue(ref _searchEngineScoreMsRun, indices[0], indices[1], double.TryParse(value, out tempDbl) ? tempDbl : default(double?));
                    return;

                case Fields.NumberOfPsmsPerMsRun:
                    SetListValue(ref _numberOfPsmsPerMsRun, indices[0], int.Parse(value));
                    return;

                case Fields.NumberOfDistinctPeptidesPerMsRun:
                    SetListValue(ref _numberOfDistinctPeptidesPerMsRun, indices[0], int.Parse(value));
                    return;

                case Fields.NumberOfUniquePeptidesPerMsRun:
                    SetListValue(ref _numberOfUniquePeptidesPerMsRun, indices[0], int.Parse(value));
                    return;
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                SetOptionalData(fieldName, value);
                return;
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 3
0
        public override string GetValue(string fieldName)
        {
            switch (fieldName)
            {
            case Fields.Identifier:
                return(Identifiers == null ? MzTab.NullFieldText : string.Join("|", Identifiers));

            case Fields.ChemicalFormula:
                return(ChemicalFormula.ToString());

            case Fields.Smiles:
                return(Smiles ?? MzTab.NullFieldText);

            case Fields.InChIKey:
                return(InChIKeys == null ? MzTab.NullFieldText : string.Join("|", InChIKeys));

            case Fields.Description:
                return(Description ?? MzTab.NullFieldText);

            case Fields.ExperimentMZ:
                return(ExperimentalMZ.ToString());

            case Fields.TheoreticalMZ:
                return(TheoreticalMZ.ToString());

            case Fields.Charge:
                return(Charge.ToString());

            case Fields.RetentionTime:
                return(RetentionTimes == null ? MzTab.NullFieldText : string.Join("|", RetentionTimes));

            case Fields.TaxID:
                return(TaxID.ToString());

            case Fields.Species:
                return(Species ?? MzTab.NullFieldText);

            case Fields.Database:
                return(Database ?? MzTab.NullFieldText);

            case Fields.DatabaseVersion:
                return(DatabaseVersion ?? MzTab.NullFieldText);

            case Fields.Reliability:
                return((Reliability == MzTab.MetabolomicsReliabilityScore.NotSet) ? MzTab.NullFieldText : ((int)Reliability).ToString());

            case Fields.Uri:
                return(Uri == null ? MzTab.NullFieldText : Uri.ToString());

            case Fields.SpectralReference:
                return(SpectralReference ?? MzTab.NullFieldText);

            case Fields.SearchEngine:
                return(SearchEngines == null ? MzTab.NullFieldText : string.Join("|", SearchEngines));

            case Fields.Modifications:
                return(Modifications ?? MzTab.NullFieldText);
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                switch (condensedFieldName)
                {
                case Fields.BestSearchEngineScores:
                    return(GetListValue(_bestSearchEngineScores, indices[0]));

                case Fields.SearchEngineScorePerMsRun:
                    return(GetListValue(_searchEngineScorePerMsRun, indices[0], indices[1]));

                case Fields.AbundanceAssay:
                    return(GetListValue(_abundanceAssays, indices[0]));

                case Fields.AbundanceStudyVariable:
                    return(GetListValue(_abundanceStudyVariables, indices[0]));

                case Fields.AbundanceStDevStudyVariable:
                    return(GetListValue(_abundanceStdevStudyVariables, indices[0]));

                case Fields.AbudnanceStdErrorStudyVariable:
                    return(GetListValue(_abundanceStandardErrorStudyVariables, indices[0]));
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                return(GetOptionalData(fieldName));
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 4
0
        public override void SetValue(string fieldName, string value)
        {
            switch (fieldName)
            {
            case Fields.Sequence:
                Sequence = value; return;

            case Fields.ID:
                ID = int.Parse(value); return;

            case Fields.Accession:
                Accession = value; return;

            case Fields.Unique:
                Unique = value.Equals("1"); return;

            case Fields.Database:
                Database = value; return;

            case Fields.DatabaseVersion:
                DatabaseVersion = value; return;

            case Fields.SearchEngine:
                SearchEngines = value.Split('|').Select(datum => (CVParamater)datum).ToList(); return;

            case Fields.Reliability:
                Reliability = (MzTab.ReliabilityScore) int.Parse(value); return;

            case Fields.Modifications:
                Modifications = value; return;

            case Fields.RetentionTime:
                RetentionTime = value.Split('|').Select(double.Parse).ToList(); return;

            case Fields.Charge:
                Charge = int.Parse(value); return;

            case Fields.ExperimentalMZ:
                ExperimentalMZ = double.Parse(value); return;

            case Fields.TheoreticalMZ:
                TheoreticalMZ = double.Parse(value); return;

            case Fields.Uri:
                Uri = new Uri(value); return;

            case Fields.SpectraReference:
                SpectraReference = value; return;

            case Fields.PreviousAminoAcid:
                PreviousAminoAcid = value[0]; return;

            case Fields.FollowingAminoAcid:
                FollowingAminoAcid = value[0]; return;

            case Fields.StartResidue:
                StartResiduePosition = int.Parse(value); return;

            case Fields.EndResidue:
                EndResiduePosition = int.Parse(value); return;
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                if (condensedFieldName == Fields.SearchEngineScore)
                {
                    SetListValue(ref _searchEngineScores, indices[0], double.Parse(value));
                    return;
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                SetOptionalData(fieldName, value);
                return;
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 5
0
        public override string GetValue(string fieldName)
        {
            switch (fieldName)
            {
            case Fields.Accession:
                return(Accession);

            case Fields.Description:
                return(Description);

            case Fields.Database:
                return(Database);

            case Fields.DatabaseVersion:
                return(DatabaseVersion);

            case Fields.SearchEngine:
                return(SearchEngines == null ? MzTab.NullFieldText : string.Join("|", SearchEngines));

            case Fields.TaxID:
                return(TaxID.ToString());

            case Fields.Species:
                return(Species);

            case Fields.Modifications:
                return(Modificiations);

            case Fields.AmbiguityMembers:
                return(AmbiguityMembers == null ? MzTab.NullFieldText : string.Join(",", AmbiguityMembers));

            case Fields.Reliability:
                if (Reliability == MzTab.ReliabilityScore.NotSet)
                {
                    return(MzTab.NullFieldText);
                }
                return(((int)Reliability).ToString());

            case Fields.Coverage:
                return(Coverage.ToString());

            case Fields.Uri:
                return(Uri != null?Uri.ToString() : MzTab.NullFieldText);

            case Fields.GoTerms:
                return(GoTerms == null ? MzTab.NullFieldText : string.Join("|", GoTerms));
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                switch (condensedFieldName)
                {
                case Fields.SearchEngine:
                    return(GetListValue(_searchEngines, indices[0]));

                case Fields.BestSearchEngineScore:
                    return(GetListValue(_bestSearchEngineScores, indices[0]));

                case Fields.AbundancePerAssay:
                    return(GetListValue(_abundanceAssays, indices[0]));

                case Fields.AbundanceStudyVariables:
                    return(GetListValue(_abundanceStudyVariables, indices[0]));

                case Fields.AbundanceStdevStudyVariables:
                    return(GetListValue(_abundanceStdevStudyVariables, indices[0]));

                case Fields.AbundanceStandardErrorStudyVariables:
                    return(GetListValue(_abundanceStandardErrorStudyVariables, indices[0]));

                case Fields.SearchEngineScoreMsRun:
                    return(GetListValue(_searchEngineScoreMsRun, indices[0], indices[1]));

                case Fields.NumberOfPsmsPerMsRun:
                    return(GetListValue(_numberOfPsmsPerMsRun, indices[0]));

                case Fields.NumberOfDistinctPeptidesPerMsRun:
                    return(GetListValue(_numberOfDistinctPeptidesPerMsRun, indices[0]));

                case Fields.NumberOfUniquePeptidesPerMsRun:
                    return(GetListValue(_numberOfUniquePeptidesPerMsRun, indices[0]));
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                return(GetOptionalData(fieldName));
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 6
0
        public override string GetValue(string fieldName)
        {
            switch (fieldName)
            {
            case Fields.Sequence:
                return(string.IsNullOrEmpty(Sequence) ? MzTab.NullFieldText : Sequence);

            case Fields.ID:
                return(ID.ToString());

            case Fields.Accession:
                return(Accession);

            case Fields.Unique:
                return(Unique ? "1" : "0");

            case Fields.Database:
                return(string.IsNullOrEmpty(Database) ? MzTab.NullFieldText : Database);

            case Fields.DatabaseVersion:
                return(string.IsNullOrEmpty(DatabaseVersion) ? MzTab.NullFieldText : DatabaseVersion);

            case Fields.SearchEngine:
                return(SearchEngines == null ? MzTab.NullFieldText : string.Join("|", SearchEngines));

            case Fields.Reliability:
                if (Reliability == MzTab.ReliabilityScore.NotSet)
                {
                    return(MzTab.NullFieldText);
                }
                return(((int)Reliability).ToString());

            case Fields.Modifications:
                return(string.IsNullOrEmpty(Modifications) ? MzTab.NullFieldText : Modifications);

            case Fields.RetentionTime:
                return(RetentionTime == null ? MzTab.NullFieldText : string.Join("|", RetentionTime));

            case Fields.Charge:
                return(Charge.ToString());

            case Fields.ExperimentalMZ:
                return(ExperimentalMZ.ToString());

            case Fields.TheoreticalMZ:
                return(TheoreticalMZ.ToString());

            case Fields.Uri:
                return(Uri == null ? MzTab.NullFieldText : Uri.ToString());

            case Fields.SpectraReference:
                return(string.IsNullOrEmpty(SpectraReference) ? MzTab.NullFieldText : SpectraReference);

            case Fields.PreviousAminoAcid:
                return(default(char).Equals(PreviousAminoAcid) ? "-" :  PreviousAminoAcid.ToString());

            case Fields.FollowingAminoAcid:
                return(default(char).Equals(FollowingAminoAcid) ? "-" : FollowingAminoAcid.ToString());

            case Fields.StartResidue:
                return(StartResiduePosition.ToString());

            case Fields.EndResidue:
                return(EndResiduePosition.ToString());
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                if (condensedFieldName == Fields.SearchEngineScore)
                {
                    return(GetListValue(_searchEngineScores, indices[0]));
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                return(GetOptionalData(fieldName));
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 7
0
        public override void SetValue(string fieldName, string value)
        {
            if (MzTab.NullFieldText.Equals(value))
            {
                return;
            }

            switch (fieldName)
            {
            case Fields.Sequence:
                Sequence = value; return;

            case Fields.Accession:
                Accession = value; return;

            case Fields.Unique:
                Unique = value.Equals("1"); return;

            case Fields.Database:
                Database = value; return;

            case Fields.DatabaseVersion:
                DatabaseVersion = value; return;

            case Fields.SearchEngine:
                SearchEngines = value.Split('|').Select(datum => (CVParamater)datum).ToList(); return;

            case Fields.Reliability:
                Reliability = (MzTab.ReliabilityScore) int.Parse(value); return;

            case Fields.Modifications:
                Modifications = value; return;

            case Fields.RetentionTime:
                RetentionTime = value.Split('|').Select(double.Parse).ToList(); return;

            case Fields.RetentionTimeWindow:
                RetentionTimeWindows = value.Split('|').Select(double.Parse).ToList(); return;

            case Fields.Charge:
                Charge = int.Parse(value); return;

            case Fields.MZ:
                MZ = double.Parse(value); return;

            case Fields.Uri:
                Uri = new Uri(value); return;

            case Fields.SpectraReference:
                SpectraReference = value; return;
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                switch (condensedFieldName)
                {
                case Fields.AbundanceAssay:
                    SetListValue(ref _abundanceAssays, indices[0], double.Parse(value)); return;

                case Fields.AbundanceStudyVariable:
                    SetListValue(ref _abundanceStudyVariables, indices[0], double.Parse(value)); return;

                case Fields.AbundanceStDevStudyVariable:
                    SetListValue(ref _abundanceStdevStudyVariables, indices[0], double.Parse(value)); return;

                case Fields.AbudnanceStdErrorStudyVariable:
                    SetListValue(ref _abundanceStandardErrorStudyVariables, indices[0], double.Parse(value)); return;

                case Fields.BestSearchEngineScore:
                    SetListValue(ref _bestSearchEngineScores, indices[0], double.Parse(value)); return;
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                SetOptionalData(fieldName, value);
                return;
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 8
0
        public override string GetValue(string fieldName)
        {
            switch (fieldName)
            {
            case Fields.Sequence:
                return(Sequence);

            case Fields.Accession:
                return(Accession);

            case Fields.Unique:
                return(Unique ? "1" : "0");

            case Fields.Database:
                return(Database);

            case Fields.DatabaseVersion:
                return(DatabaseVersion);

            case Fields.SearchEngine:
                return(string.Join("|", SearchEngines));

            case Fields.Reliability:
                if (Reliability == MzTab.ReliabilityScore.NotSet)
                {
                    return(MzTab.NullFieldText);
                }
                return(((int)Reliability).ToString());

            case Fields.Modifications:
                return(Modifications);

            case Fields.RetentionTime:
                return(string.Join("|", RetentionTime));

            case Fields.Charge:
                return(Charge.ToString());

            case Fields.MZ:
                return(MZ.ToString());

            case Fields.Uri:
                return(Uri.ToString());

            case Fields.SpectraReference:
                return(SpectraReference);

            case Fields.RetentionTimeWindow:
                return(string.Join("|", RetentionTimeWindows));
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);

                switch (condensedFieldName)
                {
                case Fields.AbundanceAssay:
                    return(GetListValue(_abundanceAssays, indices[0]));

                case Fields.AbundanceStudyVariable:
                    return(GetListValue(_abundanceStudyVariables, indices[0]));

                case Fields.AbundanceStDevStudyVariable:
                    return(GetListValue(_abundanceStdevStudyVariables, indices[0]));

                case Fields.AbudnanceStdErrorStudyVariable:
                    return(GetListValue(_abundanceStandardErrorStudyVariables, indices[0]));

                case Fields.BestSearchEngineScore:
                    return(GetListValue(_bestSearchEngineScores, indices[0]));
                }
            }

            if (fieldName.StartsWith(MzTab.OptionalColumnPrefix))
            {
                return(GetOptionalData(fieldName));
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 9
0
        public override void SetValue(string fieldName, string value)
        {
            switch (fieldName)
            {
            case Fields.Mode:
                Mode = (MzTab.MzTabMode)Enum.Parse(typeof(MzTab.MzTabMode), value, true);
                return;

            case Fields.Type:
                Type = (MzTab.MzTabType)Enum.Parse(typeof(MzTab.MzTabType), value, true);
                return;

            case Fields.Description:
                Description = value;
                return;

            case Fields.Title:
                Title = value;
                return;

            case Fields.Version:
                Version = value;
                return;

            case Fields.ID:
                ID = value;
                return;

            case Fields.ProteinQuantificationUnit:
                ProteinQuantificationUnit = new CVParamater(value);
                return;
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);
                switch (condensedFieldName)
                {
                case Fields.FixedMod:
                    SetListValue(ref _fixedModifications, indices[0], new CVParamater(value));
                    return;

                case Fields.FixedModSite:
                    SetListValue(ref _fixedModificationSites, indices[0], value);
                    return;

                case Fields.VariableMod:
                    SetListValue(ref _variableModifications, indices[0], new CVParamater(value));
                    return;

                case Fields.PsmSearchEngineScore:
                    SetListValue(ref _psmSearchEngineScores, indices[0], new CVParamater(value));
                    return;

                case Fields.ProteinSearchEngineScore:
                    SetListValue(ref _proteinSearchEngineScores, indices[0], new CVParamater(value));
                    return;

                case Fields.StudyVariableDescription:
                    SetListValue(ref _studyVariableDescriptions, indices[0], value);
                    return;

                case Fields.MsRunLocation:
                    SetListValue(ref _msRunLocations, indices[0], value);
                    return;

                case Fields.Software:
                    SetListValue(ref _software, indices[0], new MzTabSoftware(new CVParamater(value)));
                    return;

                case Fields.SoftwareSettings:
                    SetFieldValue(ref _software, indices[0], sw => sw.Settings, value);
                    return;
                }
            }
            //throw new ArgumentException("Unexpected field name: " + fieldName);
        }
Esempio n. 10
0
        public override string GetValue(string fieldName)
        {
            switch (fieldName)
            {
            case Fields.Mode:
                return(Enum.GetName(typeof(MzTab.MzTabMode), Mode));

            case Fields.Type:
                return(Enum.GetName(typeof(MzTab.MzTabType), Type));

            case Fields.Description:
                return(Description);

            case Fields.Title:
                return(Title);

            case Fields.Version:
                return(Version);

            case Fields.ID:
                return(ID);

            case Fields.ProteinQuantificationUnit:
                return(ProteinQuantificationUnit == null ? MzTab.NullFieldText : ProteinQuantificationUnit.ToString());
            }

            if (fieldName.Contains("["))
            {
                string     condensedFieldName;
                List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName);
                switch (condensedFieldName)
                {
                case Fields.FixedMod:
                    return(GetListValue(_fixedModifications, indices[0]));

                case Fields.FixedModSite:
                    return(GetListValue(_fixedModificationSites, indices[0]));

                case Fields.VariableMod:
                    return(GetListValue(_variableModifications, indices[0]));

                case Fields.PsmSearchEngineScore:
                    return(GetListValue(_psmSearchEngineScores, indices[0]));

                case Fields.ProteinSearchEngineScore:
                    return(GetListValue(_proteinSearchEngineScores, indices[0]));

                case Fields.StudyVariableDescription:
                    return(GetListValue(_studyVariableDescriptions, indices[0]));

                case Fields.MsRunLocation:
                    return(GetListValue(_msRunLocations, indices[0]));

                case Fields.Software:
                    return(GetListValue(_software, indices[0]));

                case Fields.SoftwareSettings:
                    return(GetFieldValue(_software, indices[0], sw => sw.Settings, indices[1]));
                }
            }

            throw new ArgumentException("Unexpected field name: " + fieldName);
        }