ANGSD / NgsRelate

GNU General Public License v2.0
42 stars 11 forks source link

use SM tag if using vcf/bcf #17

Open ANGSD opened 5 years ago

didillysquat commented 3 years ago

Hi there,

If this relates to using the sample names in VCF files rather than assigned integers, this would be very helpful.

As a quick sanity check, could you confirm that the output sample naming (0-->N) in the results file is indeed the same as the sample order (left to right) in the input .vcf file. E.g. sample '0' in the results file is the first sample in the .vcf, and sample '1' in the results file is the second sample in the .vcf etc...

Thanks so much.

HomereAMK commented 1 year ago

Hej, I have a similar question as Benjamin about $a an $b column in NgsRelate output. I have 19 individuals numbered from individual1 to individual19 but $a start with a value of 0:

head(WADD)
  a b nSites       J9    J8       J7 J6 J5 J4 J3 J2 J1      rab    Fa    Fb    theta
1 0 1 424664 1.000000 0e+00 0.000000  0  0  0  0  0  0 0.000007 2e-06 2e-06 0.000005
2 0 2 428812 0.992928 2e-06 0.007070  0  0  0  0  0  0 0.007071 0e+00 0e+00 0.003535
3 0 3 489673 1.000000 0e+00 0.000000  0  0  0  0  0  0 0.000009 0e+00 0e+00 0.000005
4 0 4 590884 1.000000 0e+00 0.000000  0  0  0  0  0  0 0.000003 1e-06 2e-06 0.000002
5 0 5 575600 0.964439 3e-06 0.035558  0  0  0  0  0  0 0.035560 0e+00 0e+00 0.017780
6 0 6 588079 1.000000 0e+00 0.000000  0  0  0  0  0  0 0.000005 2e-06 2e-06 0.000003
  inbred_relatedness_1_2 inbred_relatedness_2_1 fraternity identity zygosity X2of3_IDB  FDiff     loglh
1                  2e-06                  2e-06   0.000000    2e-06 0.000002  0.000007  0e+00 -597341.5
2                  0e+00                  0e+00   0.007070    0e+00 0.007070  0.007071  0e+00 -622501.2
3                  0e+00                  0e+00   0.000000    0e+00 0.000000  0.000009  0e+00 -705558.7
4                  0e+00                  0e+00   0.000001    0e+00 0.000001  0.000005 -1e-06 -888132.5
5                  0e+00                  0e+00   0.035558    0e+00 0.035558  0.035560  0e+00 -910383.2
6                  2e-06                  2e-06   0.000000    2e-06 0.000002  0.000005  0e+00 -889309.4
  nIter bestoptimll coverage
1    90   -597341.8 0.532331
2   138        -1.0 0.537531
3    58   -705559.0 0.613822
4    91   -888133.0 0.740694
5   110        -1.0 0.721535
6    71   -889309.9 0.737178
                                                                                                                X2dsfs
1 2.394796e-01,2.414616e-01,9.230918e-03,1.937839e-01,2.612793e-01,1.350588e-02,1.347052e-02,1.790330e-02,9.885077e-03
2 2.653634e-01,2.179033e-01,8.895433e-03,1.966038e-01,2.543681e-01,1.419341e-02,1.467328e-02,1.979155e-02,8.207748e-03
3 2.334524e-01,2.477280e-01,1.074681e-02,1.899863e-01,2.594139e-01,1.552159e-02,1.546589e-02,1.863968e-02,9.045419e-03
4 2.249027e-01,2.540790e-01,1.474548e-02,1.799104e-01,2.634229e-01,1.848910e-02,1.583578e-02,1.864780e-02,9.966933e-03
5 2.604610e-01,2.168638e-01,1.662494e-02,1.895160e-01,2.538857e-01,1.868943e-02,1.567064e-02,1.924076e-02,9.047746e-03
6 2.284740e-01,2.493034e-01,1.583891e-02,1.822067e-01,2.616735e-01,1.802491e-02,1.673095e-02,1.817321e-02,9.574491e-03
        R0       R1     KING X2dsfs_loglike X2dsfsf_niter Pops
1 0.086886 0.533925 0.218230      -650097.6            55 WADD
2 0.092656 0.538846 0.216490      -648797.9            39 WADD
3 0.101046 0.520819 0.208931      -767919.2            35 WADD
4 0.116092 0.525053 0.202671      -969362.2            30 WADD
5 0.127205 0.532696 0.198822      -937745.9            31 WADD
6 0.124468 0.523056 0.198308      -969072.9            27 WADD

Does the '0' correspond to Individual1 and so on, and should I add 1 to all the values in the $a and $b columns? Best, Homère