コード例 #1
0
ファイル: ReadPair.cs プロジェクト: snashraf/Pisces
        public bool IsComplete()
        {
            var completePair = Read1 != null && Read2 != null;

            if (!completePair)
            {
                return(false);
            }

            var expectedSupplementary    = (Read1.HasSupplementaryAlignment() ? Read1.GetSupplementaryAlignments().Count : 0) + (Read2.HasSupplementaryAlignment() ? Read2.GetSupplementaryAlignments().Count : 0);
            var supplementariesCollected = expectedSupplementary <= (Read1SupplementaryAlignments.Count + Read2SupplementaryAlignments.Count); // TODO can you have multiple supplementary?

            return(supplementariesCollected);
        }
コード例 #2
0
ファイル: ReadPair.cs プロジェクト: arnoldliaoILMN/Pisces
        public bool IsComplete(bool requireSupplementaryForCompletion = true)
        {
            var completePair = Read1 != null && Read2 != null;

            if (!completePair)
            {
                return(false);
            }

            if (requireSupplementaryForCompletion)
            {
                var r1SupplementariesCollected = !Read1.HasSupplementaryAlignment() || Read1.GetSupplementaryAlignments().Count <= (Read1SupplementaryAlignments?.Count ?? 0);
                var r2SupplementariesCollected = !Read2.HasSupplementaryAlignment() || Read2.GetSupplementaryAlignments().Count <= (Read2SupplementaryAlignments?.Count ?? 0);

                return(r1SupplementariesCollected && r2SupplementariesCollected);
            }

            return(true);
        }