Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mnievesc
    Junior Member
    • Oct 2013
    • 3

    Help with smartpca?

    Hi everyone,

    This is my first post so I apologize if its not great, any advice on posting etiquette is valued highly!

    I am attempting to use smartpca from Eigensoft to perform a PCA with a subset of genotyped individuals and then project another individual onto the plot. I followed the instructions in the README file and made a list of population names and added the poplistname parameter to my par file:

    genotypename: PI.merged.ped
    snpname: PI4.merged.map
    indivname: PI.merged.ped
    evecoutname: PI.merged.evec
    evaloutname: PI4.merged.eval
    numoutlieriter: 0
    poplistname: PI.poplist.txt


    However, I keep getting this error message everytime I try to run the program:

    "fatalx:
    XTX has zero trace (perhaps no data)
    Aborted (Core dumped)"


    I tried using different formats in the par file but nothing fixed the issue.
    Does anyone have any advice regarding what I may be doing wrong?

    Many thanks!
  • Skiaphrene
    Member
    • Aug 2013
    • 18

    #2
    Hi mnievesc,



    I'm not familiar with Eigensoft's smartpca so I can't help you with this issue specifically. The error is telling you that somehow, with the input data you're giving it, the empirical covariance matrix (X transposed X) has a zero trace, i.e. the sum of it's diagonal elements is 0. I might be wrong but my intuition is that this means that all of your input variables are constants...



    If I'm wrong about this I could propose something else. If you're not afraid of using R to perform your PCA then you could use the package FactoMineR (available on CRAN: http://cran.r-project.org/web/packag...neR/index.html) - their PCA function supports the inclusion of "illustrative" variables and individuals that do not participate in the PC construction but that are projected onto the plots afterwards. You can read about this on this page on their website: http://factominer.free.fr/classical-...-analysis.html.



    Alternatively if Eigensoft's smartpca returns the "raw' loadings (eigen vector) matrix W, then you can calculate the coordinates of new individuals in the PC space T by multiplying their original (centred, scaled - as with the input) coordinates X by the loadings: T=XW. Check out the Wikipedia page for PCA for the math: http://en.wikipedia.org/wiki/Princip...onent_analysis.



    Hope this helps,

    -- Alex

    Comment

    • mnievesc
      Junior Member
      • Oct 2013
      • 3

      #3
      This is great advice thank you very much. I do use R regularly so I wll give this idea a try!

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by SEQadmin2


        I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

        Here are nine questions we think about, in roughly the order they matter, before...
        06-18-2026, 07:11 AM
      • SEQadmin2
        From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
        by SEQadmin2


        Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


        The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
        ...
        06-02-2026, 10:05 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Today, 05:37 AM
      0 responses
      5 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-26-2026, 11:10 AM
      0 responses
      16 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-17-2026, 06:09 AM
      0 responses
      49 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-09-2026, 11:58 AM
      0 responses
      109 views
      0 reactions
      Last Post SEQadmin2  
      Working...