Exemple #1
0
        public List <int> Execute(string samplesfilepath)
        {
            string pshcmd = String.Format("{0}\\overlap_compute.exe {1} {2}",
                                          GConfig.TOOL_OVERLAP_COMPUTE_PATH,
                                          Path.GetDirectoryName(samplesfilepath),
                                          Path.GetFileName(samplesfilepath));

            PowerShell.Execute(pshcmd,
                               false,
                               Path.GetDirectoryName(samplesfilepath));

            string resultFileName = Path.Combine(
                Path.GetDirectoryName(samplesfilepath),
                resultfile_prefix + Path.GetFileName(samplesfilepath));

            try
            {
                List <int> lst = SpaceSeparatedFileParser.ParseInt(resultFileName);
                return(lst);
            }
            catch (Exception ex)
            {
                File.Delete(resultFileName);
                throw ex;
            }
        }
Exemple #2
0
        public List <int> Execute(string dmrfilepath, string samplesfilepath)
        {
            string pshcmd = String.Format("{0}\\underground_filter.exe {1} {2} {3} {4}",
                                          GConfig.TOOL_UNDERGROUND_FILTER_PATH,
                                          Path.GetDirectoryName(dmrfilepath),
                                          Path.GetFileName(dmrfilepath),
                                          Path.GetDirectoryName(samplesfilepath),
                                          Path.GetFileName(samplesfilepath));

            PowerShell.Execute(pshcmd,
                               false,
                               Path.GetDirectoryName(samplesfilepath));

            string resultFileName = Path.Combine(
                Path.GetDirectoryName(samplesfilepath),
                "underground" + Path.GetFileName(samplesfilepath));

            try
            {
                List <int> lst = SpaceSeparatedFileParser.ParseInt(resultFileName);
                return(lst);
            }
            catch (Exception ex)
            {
                File.Delete(resultFileName);
                throw ex;
            }
        }
Exemple #3
0
 private void LoadSpaceSeparatedFile(string filename, EventHandler <RowEventArgs> processEntryDelegate)
 {
     if (processEntryDelegate == null)
     {
         throw new ArgumentNullException("processEntryDelegate");
     }
     using (var streamReader = new CountingStreamReader(filename, DataFileTools.OpenInputFile(filename), Encoding.UTF8))
     {
         fileReader = streamReader;
         var reader = new SpaceSeparatedFileParser(streamReader);
         reader.RowComplete += processEntryDelegate;
         reader.Parse();
     }
     fileReader = null;
 }