Running smartpca (eigensoft) using the output from population

1,377 views
Skip to first unread message

Shane

unread,
Feb 4, 2016, 9:19:59 PM2/4/16
to Stacks
Hi stacks people,

I am trying to run smartpca from eigensoft using the result plink file from the STACKS's population.

It causes error claiming that:

warning (mapfile): bad chrom: 0 185735_10 0 631 T C
warning (mapfile): bad chrom: 0 103794_12 0 647 C A
warning (mapfile): bad chrom: 0 232483_35 0 867 T C
warning (mapfile): bad chrom: 0 107649_23 0 928 T C
warning (mapfile): bad chrom: 0 188043_10 0 1054 G C
warning (mapfile): bad chrom: 0 250387_35 0 1098 T C
warning (mapfile): bad chrom: 0 250793_7 0 1450 T C
warning (mapfile): bad chrom: 0 356259_7 0 1578 A G
warning (mapfile): bad chrom: 0 101214_32 0 1666 G A
warning (mapfile): bad chrom: 0 421487_58 0 2057 A C
genetic distance set from physical distance

So I did some searching throughout this forum and found this link : 

Initially my chromosome number was something like this: 'scaffold100059_size1319'

But I have changed it according to the link above to just numbering ranging lower than a thousand : from 1 to 117.

But it still causes the same error....

my first few lines of map file look like this: 

1 44_24 0 18480
1 50_15 0 19964
1 197153_14 0 39466
1 197155_56 0 50909
1 389671_9 0 54896
1 113_6 0 62530
1 123_5 0 83992
1 197104_20 0 128697
1 197103_27 0 128741
1 37_59 0 180880
1 36_8 0 180944
1 39_22 0 181526
1 38_11 0 181556
1 197114_8 0 182260
1 41_5 0 184150


Could someone help me please?

Shane

Ryan Waples

unread,
Feb 5, 2016, 1:40:37 AM2/5/16
to stacks...@googlegroups.com
That error message doesn't match your example file - the chrom column (the first one) still looks to be zero in your error message.  Maybe you haven't updated your call to smartpca?

I would try changing them all to be 1

-Ryan 

--
Stacks website: http://catchenlab.life.illinois.edu/stacks/
---
You received this message because you are subscribed to the Google Groups "Stacks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stacks-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/stacks-users.
For more options, visit https://groups.google.com/d/optout.

Seung-Sub Choi

unread,
Feb 5, 2016, 5:36:25 AM2/5/16
to stacks...@googlegroups.com
Hi Ryan,

Thank you for your reply.
I have noticed that and ran many times, but it still shows the chromosome as 0.

I have manually checked the chromosome number where the error has occured in map file, but it wasn't 0...
But I will try to change all first column to 1.

I have a question on PCA.
If I change all chromosome number to 1, would that affect the PCA result or the chromosome number does not matter?

If it does matter, I would like to assign different chromosomes to different numbers rather than same number 1.

Shane

You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/d_6pdz6mAxA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.

Ryan Waples

unread,
Feb 5, 2016, 1:29:42 PM2/5/16
to stacks...@googlegroups.com
I think you have the option to do some filtering of loci based on chromosome, but I don't think it occurs unless you ask for it directly.  

If i recall, I did not find any downside to specifying all the chroms to 1. That said, the file linked below has chroms 1-37.

Have you made sure that you updated your parameter file to reflect the changes?

here is a link to an example parfile:

and to an example map file:



Seung-Sub Choi

unread,
Feb 9, 2016, 5:40:12 PM2/9/16
to stacks...@googlegroups.com
Hi Ryan,

I think I have fixed the chromosome problem...

When I had a looked at your par file, you were using ped and map file only.

I was using bin plink file and when I used it, the chromosome number seems to be changed the way I wanted.

But, it gives another error...

All my physical distances are 0 and now the log file claims that:

warning (mapfile): bad chrom: 100 188416_16 0 52659
warning (mapfile): bad chrom: 100 188279_10 0 102616
warning (mapfile): bad chrom: 100 188284_7 0 114960
warning (mapfile): bad chrom: 100 188289_22 0 124256
warning (mapfile): bad chrom: 100 266801_22 0 127896
warning (mapfile): bad chrom: 100 188290_9 0 129140
warning (mapfile): bad chrom: 100 188291_9 0 131710
warning (mapfile): bad chrom: 100 188294_14 0 139598
warning (mapfile): bad chrom: 100 188303_14 0 158425
warning (mapfile): bad chrom: 100 321450_48 0 175781
genetic distance set from physical distance
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    2 242998 24299793 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    2 242998 24299772 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    4 33802 3380236 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    4 33802 3380215 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    7 499140 49914019 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    7 499140 49914002 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    7 994046 99404575 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    7 994046 99404551 
snp order check fail (gdis order != physdis order): /gpfs1m/projects/landcare00051/eigensoft/dart/all/ped/batch_1.plink.map (processing continues)    7 1016471 101647149 \

Should I modify the physical distance to make it same as genetic distance?
But then, your example map file also shows that all physical distance to 0.

Why am I getting this error message?

Seung-Sub Choi

unread,
Feb 9, 2016, 5:48:57 PM2/9/16
to stacks...@googlegroups.com
Also, I am getting this additional error massage:

## To get Tracy-Widom statistics: recompile smartpca with TWTAB correctly specified in Makefile, or
   just run twstats (see README file in POPGEN directory)

How can I recomplie smartpca with TWTAB?

Sorry for asking too much questions and thank you for your help in advance. 

Ryan Waples

unread,
Feb 9, 2016, 5:57:49 PM2/9/16
to stacks...@googlegroups.com
Not sure I can debug your error, but looking at my map file, all my genetic distances (3rd column) were zero, matching yours.  All my physical distances (4th column) were increasing within each chrom.


I just ran the twstats program directly:

example:

/home/ipseg/Programs/EIGENSOFT/EIG6.0.1/bin/twstats \
-t /home/ipseg/Programs/EIGENSOFT/EIG6.0.1/POPGEN/twtable \
-i /home/ipseg/Desktop/waples/chum_populations/results/batch_4/EIGENSOFT/paralogs.dom.eval \
-o /home/ipseg/Desktop/waples/chum_populations/results/batch_4/EIGENSOFT/paralogs.dom.tw

you just need to get the twtable file which it eigenstrat supplies




Reply all
Reply to author
Forward
0 new messages