masshunter quant 10.1 query

Hello, 

i want to change our query *.linq.qry and i looking for this *.IsMatrixSpikePercentRecoveryNull(), but i have a problem as long as my analyte is as peak not found ,query does not see it as null, can some one tell me how can i write this pls? Things like string.IsNullOrEmpty() does not work.

  • Hello  ,

    Generally what you would need to check is to see if there is a primary hit peak by using *.IsPrimaryHitPeakIDNull(). This would check to see if the peak is not found. 

    Here is a short example using slightly modified code from the shipping example D:\MassHunter\Scripts\Quant\Queries\Matrix Spike Recovery.linq.qry that accounts for the possibility of no peak being found for a compound.

    var query =
      from b in ds.Batch
      join c in ds.TargetCompound on new { b.BatchID, b.SampleID } equals new { c.BatchID, c.SampleID }
           where ( b.SampleType == "Matrix" || b.SampleType == "MatrixDup" ) &&
                 c.CompoundType == "MatrixSpike" &&
                 ! c.IsPrimaryHitPeakIDNull()
           join p in ds.Peak

           .
           .
           .

    The rest of the code would be unchanged. 

  • Thank you, I already had this, but I forgot that I don't filter primaryhitpeak in the next lines, that's why I added this before it 

                QuantitationDataSet ds = this.BatchDataSet;
                var PrimaryHit = from a in ds.Batch
                                            join b in ds.TargetCompound on new { a.BatchID, a.SampleID } equals new { b.BatchID, b.SampleID }
                                            where a.SampleType=="QC"
                                            where b.IsPrimaryHitPeakIDNull()
                                            select new { b.SampleID, b.CompoundID, CompoundName = b.CompoundName, Error = "missing analyte" };

                var PHit = PrimaryHit.ToList();

                if (PrimaryHit.ToList().Count > 0)
                {
                    return PrimaryHit.ToList();



Was this helpful?