Beispiel #1
0
 private MsDataFileImpl GetDataFile(bool ignoreZeroIntensityPoints)
 {
     if (_dataFile == null)
     {
         if (DataFilePath is MsDataFilePath)
         {
             string dataFilePath       = FindDataFilePath();
             var    lockMassParameters = DataFilePath.GetLockMassParameters();
             if (dataFilePath == null)
             {
                 throw new FileNotFoundException(string.Format(
                                                     Resources
                                                     .ScanProvider_GetScans_The_data_file__0__could_not_be_found__either_at_its_original_location_or_in_the_document_or_document_parent_folder_,
                                                     DataFilePath));
             }
             int sampleIndex = SampleHelp.GetPathSampleIndexPart(dataFilePath);
             if (sampleIndex == -1)
             {
                 sampleIndex = 0;
             }
             // Full-scan extraction always uses SIM as spectra
             _dataFile = new MsDataFileImpl(dataFilePath, sampleIndex, lockMassParameters, true,
                                            combineIonMobilitySpectra: DataFilePath.GetCombineIonMobilitySpectra(),
                                            requireVendorCentroidedMS1: DataFilePath.GetCentroidMs1(),
                                            requireVendorCentroidedMS2: DataFilePath.GetCentroidMs2(),
                                            ignoreZeroIntensityPoints: ignoreZeroIntensityPoints);
         }
         else
         {
             _dataFile = DataFilePath.OpenMsDataFile(true, 0, null, ignoreZeroIntensityPoints);
         }
     }
     return(_dataFile);
 }
Beispiel #2
0
        public const double DISPLAY_FILTER_PERCENT = 0.01; // filter peaks less than this percentage of maximum intensity

        public ChromatogramLoadingStatus(MsDataFileUri filePath, IEnumerable <string> replicateNames) :
            base(SampleHelp.GetFileName(filePath))
        {
            Transitions    = new TransitionData();
            FilePath       = filePath;
            ReplicateNames = replicateNames;
        }
Beispiel #3
0
 public static MsDataFilePath ParseUri(string url)
 {
     return(new MsDataFilePath(SampleHelp.GetPathFilePart(url),
                               SampleHelp.GetPathSampleNamePart(url),
                               SampleHelp.GetPathSampleIndexPart(url),
                               SampleHelp.GetLockmassParameters(url),
                               SampleHelp.GetCentroidMs1(url),
                               SampleHelp.GetCentroidMs2(url),
                               SampleHelp.GetCombineIonMobilitySpectra(url)));
 }
 public static MsDataFileUri Parse(string url)
 {
     if (url.StartsWith(ChorusUrl.ChorusUrlPrefix))
     {
         return(new ChorusUrl(url));
     }
     return(new MsDataFilePath(SampleHelp.GetPathFilePart(url),
                               SampleHelp.GetPathSampleNamePart(url),
                               SampleHelp.GetPathSampleIndexPart(url),
                               SampleHelp.GetLockmassParameters(url),
                               SampleHelp.GetCentroidMs1(url),
                               SampleHelp.GetCentroidMs2(url)));
 }
Beispiel #5
0
 public static MsDataFileUri Parse(string url)
 {
     if (url.StartsWith(UnifiUrl.UrlPrefix))
     {
         return(new UnifiUrl(url));
     }
     return(new MsDataFilePath(SampleHelp.GetPathFilePart(url),
                               SampleHelp.GetPathSampleNamePart(url),
                               SampleHelp.GetPathSampleIndexPart(url),
                               SampleHelp.GetLockmassParameters(url),
                               SampleHelp.GetCentroidMs1(url),
                               SampleHelp.GetCentroidMs2(url),
                               SampleHelp.GetCombineIonMobilitySpectra(url)));
 }
Beispiel #6
0
        private MsDataFileImpl GetDataFile(bool ignoreZeroIntensityPoints)
        {
            if (_dataFile == null)
            {
                const bool simAsSpectra  = true;  // SIM always as spectra here
                const bool preferOnlyMs1 = false; // Open with all available spectra indexed

                if (DataFilePath is MsDataFilePath)
                {
                    string dataFilePath       = FindDataFilePath();
                    var    lockMassParameters = DataFilePath.GetLockMassParameters();
                    if (dataFilePath == null)
                    {
                        throw new FileNotFoundException(string.Format(
                                                            Resources
                                                            .ScanProvider_GetScans_The_data_file__0__could_not_be_found__either_at_its_original_location_or_in_the_document_or_document_parent_folder_,
                                                            DataFilePath));
                    }
                    int sampleIndex = SampleHelp.GetPathSampleIndexPart(dataFilePath);
                    if (sampleIndex == -1)
                    {
                        sampleIndex = 0;
                    }
                    // Full-scan extraction always uses SIM as spectra
                    _dataFile = new MsDataFileImpl(dataFilePath, sampleIndex,
                                                   lockMassParameters,
                                                   simAsSpectra,
                                                   combineIonMobilitySpectra: _cachedFile.HasCombinedIonMobility,
                                                   requireVendorCentroidedMS1: _cachedFile.UsedMs1Centroids,
                                                   requireVendorCentroidedMS2: _cachedFile.UsedMs2Centroids,
                                                   ignoreZeroIntensityPoints: ignoreZeroIntensityPoints);
                }
                else
                {
                    _dataFile = DataFilePath.OpenMsDataFile(simAsSpectra, preferOnlyMs1,
                                                            _cachedFile.UsedMs1Centroids, _cachedFile.UsedMs2Centroids, ignoreZeroIntensityPoints);
                }
            }
            return(_dataFile);
        }
 public override string ToString()
 {
     return(SampleHelp.EncodePath(FilePath, SampleName, SampleIndex, LockMassParameters, CentroidMs1, CentroidMs2));
 }
Beispiel #8
0
 public override string ToString()
 {
     return(SampleHelp.LegacyEncodePath(FilePath, SampleName, SampleIndex, LockMassParameters,
                                        LegacyCentroidMs1, LegacyCentroidMs2, LegacyCombineIonMobilitySpectra));
 }