locked
Problem Inserting SNPs RRS feed

  • Question

  • I am following the code sample for inserting SNPs but for some reason when when I Add a SNP to a GeneticSnpResults object the SNP never gets added. The Add method does not fail but when you look at the Count of SnpData after the add it is always 0.

    gsr.SnpData.SnpItems.Add(thissnp.RSID, new SnpItem( thissnp.RSID, "-", thissnp.Genotype, thissnp.RSID, pos, pos + 1));

    I also notice when following the example to retrieve the data that HealthRecordItemSections.OtherData no longer exists so I am wondering if something is just a little out of date in the example (http://blogs.msdn.com/healthvaultdatatypes/default.aspx)

    Thanks,
    Don Rule

     

    var sortedList = from snp in t3List group snp by snp.Chromosome into groupedsnps
                          select new { Chromosome = groupedsnps.Key, SNPs = groupedsnps };

     

    foreach (var c in sortedList)
    {
        GeneticSnpResults gsr = new GeneticSnpResults();
        gsr.When =
    new ApproximateDateTime(DateTime.Now);
        gsr.Chromosome = c.Chromosome;
        gsr.AnnotationVersion =
    "36";
        gsr.dbSnpBuild =
    "129";
        gsr.GenomeBuild =
    "36";
        gsr.LaboratoryName, 
    Platform, and TestProvider  are populated...
        gsr.NumberingScheme = GenomeNumberingScheme.ZeroBased;

     

    int pos;
    foreach (var thissnp in c.SNPs)
    {
        int.TryParse(thissnp.Position, out pos);
        gsr.SnpData.SnpItems.Add(thissnp.RSID,
    new SnpItem( thissnp.RSID,
                                                                                    "
    -",
                                                                                    thissnp.Genotype,
                                                                                    thissnp.RSID,
                                                                                    pos,
                                                                                    pos + 1));
    }

     

    if (gsr.SnpData.SnpItems != null)   // This succeeds and the Record is inserted with no SNP data 
    {
        HealthVaultInterface hvi = new HealthVaultInterface();
        hvi.InsertChromosome(PatientID, gsr);
    }

     

    Tuesday, December 22, 2009 1:12 AM

Answers

  • Hello Don,

    In the current SDK release the OtherData property is replaced by a blob implementation.

    Before using the latest version (1.1.2193.4712) were you using any older SDK version? If yes then please let us know if you can continue with the same till the fix is released.

    Else if you have no older versions of SDK available with you then please let me know the same. I have a private copy of the older SDK package and I can send it to you if you can drop me a mail at v-and@microsoft.com. Please note that I can provide this SDK package only for testing purpose , so you will have to properly back up your existing SDK related items before using it.

    Once I am able to find out an official older version (probably 1.0.2145.4504) I can direct you to use it formally.

    Thanks and Regards,
    Aneesh D.
    • Marked as answer by Don-Rule Thursday, December 24, 2009 10:44 PM
    Thursday, December 24, 2009 9:49 PM

All replies

  • Hello,

    I tried the same scneraio by adding a single SNP item to the SNP data list and I was not able to reproduce the issue.

    After the add operation I checked the gsr.SnpData.SnpItems count and got the expected non-zero value.

    Also after adding when I checked the data in X-Ray tool I could find the data properly updated.

    Please let me know how did you verify that the data is not updated properly. Else please let me know if I missed any steps here. Also, please clarify which release of the SDK are you using?

    Thanks and Regards,
    Aneesh D.
    Tuesday, December 22, 2009 5:54 PM
  • This is odd. I modified my code to match the sample exactly as follows:

     

    SnpItem item = new SnpItem("rs1891906", "-", "GT", "SNP_C-315533", 940106, 940107);
    gsr.SnpData.SnpItems.Add(item.ReferenceSnpId, item);

    After the Add SnpItems has a count of 0 and when I use XRAY (great tool, thanks) the record is there but OtherData is null.

    It seems to me that the debug bits used to be included in the SDK - do you know if a way that I can step through the HealthVault code to see what is going on?

    Thanks very much,
    Don Rule

    Tuesday, December 22, 2009 6:22 PM
  • Sorry also the version of my Microsoft.Health dll is 1.1.2193.4712
    Tuesday, December 22, 2009 6:25 PM
  • Along with the SDK  you can also find the source code for the .Net SDK. Please look at the installation folder (in my case it is C:\Program Files\Microsoft HealthVault\SDK\Source) where you can find the Zipped code files. Please unzip it and use them with the pdb files provided along with the Assemblies.

    Regarding the issue, I am still trying to reproduce it. I will get back to you once I have an update.
    Tuesday, December 22, 2009 9:13 PM
  • Hello,

    With the new version (same as that you specified in the previous post) of HealthVault dlls I am able to reproduce this issue. I was using an older version of the dlls.

    I will contact our development team on this issue and will get back to you as soon as possible.

    Thanks and Regards,
    Aneesh D.
    Tuesday, December 22, 2009 10:42 PM
  • Thank you Aneesh - it is good to know that I am not crazy.

    Don
    Wednesday, December 23, 2009 1:52 AM
  • Hello Don,

    This is a known issue and our platform team is actively working on to fix it. Sorry for the inconvenience that this error would have caused you. Our current plan is to fix this in our January 2010 release.

    Can you please let me know the urgency of this issue? How soon are you planning to release an update to your site?  Is it possible for you to continue using our 0908 SDK until we release our new SDK in late January?

    Thanks and Regards,
    Aneesh D.
    Wednesday, December 23, 2009 9:22 PM
  • I can go back to the 0908 version and that will hold me till late January. I took a quick look on the developer center and it wasn't obvious where to download it from so a pointer would be helpful.

    Thanks and happy holidays,
    Don
    Thursday, December 24, 2009 3:41 AM
  • Hi Don,

    Please download the 0908 version of Healthvault .net SDK from the below url

    http://blogs.msdn.com/healthvault/archive/2009/08/27/healthvault-0908-release-notes.aspx


    Hope this helps you.

    Regards,
    Madan Kamuju
    Thursday, December 24, 2009 9:16 AM
  • OK, I uninstalled my SDK, installed from the link in that page (http://download.microsoft.com/download/8/9/1/891600C3-64EF-4BBC-A883-279C2365625F/HealthVaultSDK.exe) and updated the dlls in my project and rebuilt and saw the same problem.

    It looks like the binaries at that location were created on 11/18/2009 and have the same version as the ones that I was using.

    Could it be that the new bits were moved to the old drop point?

    Is there another potential workaround by writing directly to the OtherData CSV file?

    Thanks,
    Don
    Thursday, December 24, 2009 12:28 PM
  • Hello Don,

    In the current SDK release the OtherData property is replaced by a blob implementation.

    Before using the latest version (1.1.2193.4712) were you using any older SDK version? If yes then please let us know if you can continue with the same till the fix is released.

    Else if you have no older versions of SDK available with you then please let me know the same. I have a private copy of the older SDK package and I can send it to you if you can drop me a mail at v-and@microsoft.com. Please note that I can provide this SDK package only for testing purpose , so you will have to properly back up your existing SDK related items before using it.

    Once I am able to find out an official older version (probably 1.0.2145.4504) I can direct you to use it formally.

    Thanks and Regards,
    Aneesh D.
    • Marked as answer by Don-Rule Thursday, December 24, 2009 10:44 PM
    Thursday, December 24, 2009 9:49 PM
  • Thanks Aneesh, I've marked this answered and responed on a mail thread.

    Thursday, December 24, 2009 10:44 PM