Example #1
0
        public readonly Dictionary<int, HashSet<SampleIndex>> LaneIndexes; //only demux/convert reads in these lanes

        private SampleBcls(BclRunFolder bclRunFolder, Dictionary<int, HashSet<SampleIndex>> laneIndexes)
        {
            LaneIndexes = laneIndexes;
            BclRunFolder = bclRunFolder;
            foreach (int lane in LaneIndexes.Keys)
            {
                foreach (SampleIndex index in LaneIndexes[lane])
                {
                    string index1 = index.Index1Sequence;
                    string index2 = index.Index2Sequence;
                    if (BclRunFolder.ReadStructure.Index1 == null && !string.IsNullOrEmpty(index1))
                        throw new ArgumentException("Cannot have an index 1 sequence when the BCL RunFolder does not have an index 1 read");
                    if (BclRunFolder.ReadStructure.Index1 != null && !string.IsNullOrEmpty(index1) && index1.Length > BclRunFolder.ReadStructure.Index1.Length)
                        throw new ArgumentException(
                            $"Sample's index 1 sequence length ({index1.Length}) cannot be greater than the BCL RunFolder index 1 read length ({BclRunFolder.ReadStructure.Index1.Length})");
                    if (BclRunFolder.ReadStructure.Index2 == null && !string.IsNullOrEmpty(index2))
                        throw new ArgumentException("Cannot have an index 2 sequence when the BCL RunFolder does not have an index 2 read");
                    if (BclRunFolder.ReadStructure.Index2 != null && !string.IsNullOrEmpty(index2) && index2.Length > BclRunFolder.ReadStructure.Index2.Length)
                        throw new ArgumentException(
                            $"Sample's index 2 sequence length ({index2.Length}) cannot be greater than the BCL RunFolder index 2 read length ({BclRunFolder.ReadStructure.Index2.Length})");
                }
            }
        }
Example #2
0
 public Builder(BclRunFolder runFolder)
 {
     _runFolder = runFolder;
 }
Example #3
0
 public static SampleSet<SampleBcls> GetSampleBclsForRunFolder(SampleSet<IEnumerable<SampleBcls>> sampleBcls, BclRunFolder bclRunFolder)
 {
     return sampleBcls.SelectData(bcls => bcls.First(
         b => b.BclRunFolder.RunFolder.FullName.Equals(bclRunFolder.RunFolder.FullName, Utilities.IsThisMono() ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase)));
 }