A testcase is created by subclassing unittest.TestCase. The three individual tests are defined with methods whose names start with the letters test. This naming convention informs the test runner about which methods represent tests.
The crux of each test is a call to assertEqual() to check for an expected result; assertTrue() or assertFalse() to verify a condition; or assertRaises() to verify that a specific exception gets raised. These methods are used instead of the assert statement so the test runner can accumulate all test results and produce a report.
The setUp() and tearDown() methods allow you to define instructions that will be executed before and after each test method. They are covered in more detail in the section Organizing test code.
The final block shows a simple way to run the tests. unittest.main() provides a command-line interface to the test script. When run from the command line, the above script produces an output that looks like this:
git add .
git commit –m “your comments about this submission”
git push origin master
1.ecole polytechnique federale de lausanne: 洛桑联邦理工学院
2.harvard medical school: 哈佛医学院
BLAS (Basic Linear Algebra Subprograms)
## shrinkmode added. 3/15
EIGENSOFT version 7.2.1, 06/30/17 (for Linux only)
The EIGENSOFT package implements methods from the following 2 papers:
Patterson et al. 2006 PLoS Genet 2:e190 (population structure)
Price et al. 2006 Nat Genet 38:904–9 (EIGENSTRAT stratification correction)
NEW features of EIGENSOFT version 7.2.0
NEW features of EIGENSOFT version 6.1.4 include:
– pcaselection was omitted from 6.1.3 by accident
– Statically linked GSL/openblas
– Fixed memory allocation bug in pcaselection
– Some routines moved into nicklib
– Error message on allocate failure now prints length as “%ld”
supporting long values.
NEW features of EIGENSOFT version 6.1.3 include:
– Restored script file extensions to .perl instead of .pl
– Added updated ploteig script that disappeared from the repository
NEW features of EIGENSOFT version 6.1.2 include:
– Updated license info to be GPL compliant required by linking the GSL
NEW features of EIGENSOFT version 6.1.1 include:
– Minor bug fix to correctly merge version 6.0.2 and version 6.1 changes.
– pcaselection operates on evec files. Added examples.
– Backported twtable.c/h from EIGENSOFT 7alpha
NEW features of EIGENSOFT version 6.1 include:
– The range finding step of PCA fastmode only scales the multiplied matrix,
as orthogonalization is unnecessary. This appears to improve accuracy.
NEW features of EIGENSOFT version 6.0.2 include:
– Fixed Makefile and documentation to build eigenstrat properly
– Moved Tracy-Widom table into a header file for easier building
NEW features of EIGENSOFT version 6.0.1 include:
– Minor bug fix which prevents smartpca from trying to print out eigenvalues
if fastmode is set.
NEW features of EIGENSOFT version 6.0.0beta included:
– New option fastmode which implements a very fast pca approximation.
See POPGEN/README and Galinsky 2014 ASHG talk.
– Changes to external packages required. EIGENSOFT version 5.0.2 required
lapack + blas. On the other hand, EIGENSOFT version 6.0beta requires
GSL + lapack + OpenBLAS (but does not require the native version of blas).
The Makefile has been changed accordingly.
– EIGENSOFT version 6.0beta supports multi-threading. See POPGEN/README.
– Bug fix for ldregress option.
See CONVERTF/README for documentation of programs for converting file formats.
See POPGEN/README for documentation of population structure programs.
See EIGENSTRAT/README for documentation of EIGENSTRAT programs.
For questions about building this software:
Matthew Mah <email@example.com>
For questions about smartpca:
Nick Patterson <firstname.lastname@example.org>
For questions about eigenstrat:
Alkes Price <email@example.com>
All C executables are in the bin/ directory.
We have placed source code for all C executables in the src/ directory,
for users who wish to modify and recompile our programs. For example, to
recompile the eigenstrat program, type
“mv eigenstrat ../bin”
Note that some of our software will only compile if your system has the
GSL + lapack + OpenBLAS packages installed.
On Mac OSX, you can install gsl and OpenBLAS with lapack using homebrew:
“brew install gsl”
“brew install homebrew/science/openblas”
If these packages are not in standard directories, you can specify the
appropriate include and library directories with the CFLAGS and LDFLAGS
For example, on the Harvard Medical School O2 cluster, the command is:
‘make CFLAGS=”-I/n/app/openblas/0.2.19/include –I/n/app/gsl/2.3/include” LDFLAGS=”-L/n/app/openblas/0.2.19/lib –L/n/app/gsl/2.3/lib/“‘
On Mac OSX:
‘make CFLAGS=”-I/usr/local/opt/openblas/include –I/usr/local/opt/gsl/include” LDFLAGS=”-L/usr/local/opt/openblas/lib –L/usr/local/opt/gsl/lib“‘
If you have issues with missing lapacke symbols, for example “undefined reference to ‘LAPACKE_dlange’”, run make with the corresponding additional libraries linked:
This has been encountered on Linux Mint 18.
If you have trouble compiling and running our code, try compiling and
running the pcatoy program in the src directory:
If you are unable to run the pcatoy program successfully, please contact
your system administrator for help, as this is a systems issue which is
beyond our scope. Your system administrator will be able to troubleshoot
your systems issue using this trivial program. [You can also try running
the pcatoy program in the bin directory, which we have already compiled.]
To remake the entire package:
To remake EIG7.2 it is necessary to link to the OpenBLAS library. On orchestra,
the path is /opt/openblas and should work automatically. On Broad institute machines,
the user should execute “use .openblas-0.2.8” and “use GCC-4.9” at the command
prompt before attempting to remake. All other users should install OpenBLAS and
set the variable OPENBLAS to the path at the make command line,
e.g. “make install OPENBLAS=/usr/local/openblas”
EIGENSOFT was written by Nick Patterson, Alkes Price, Samuela Pollack,
Kevin Galinsky, Chris Chang, and Sasha Gusev.
We thank John Novembre and Mike Boursnell for code improvements, Matt Hanna
for the first implementation of multi-threading, and Angela Yu for a bugfix.
This software and its documentation are copyright (2010) by Harvard University
and The Broad Institute. All rights are reserved. This software is supplied
without any warranty or guaranteed support whatsoever. Neither Harvard
University nor The Broad Institute can be responsible for its use, misuse, or
functionality. The software may be freely copied for non-commercial purposes,
provided this copyright notice is retained.
1. 使用的population scale SNPs
2. EIGENSOFT 4.2
2014 — Whole-genome sequencing of Berkshire (European native pig) provides insights into its origin and domestication
Sex determination regions
The new O_niloticus_UMD1 assembly was used to study sequence differentiation across two sex-determining regions in tilapias. The first region is an XX/XY sex-determination region on LG1 found in many strains of til-apia [9, 34, 44–47]. We previously characterized this region by whole genome Illumina re-sequencing of pooled DNA from males and females . We realigned these sequences to the new O_niloticus_UMD1 assembly and searched for variants that were fixed in the XX female pool and poly-morphic in the XY male pool. Figure 4 shows the FST and the sex-patterned variant alle le frequencies for the XX/XY O. niloticus comparison across the complete Orenil1.1 and O_niloticus_UMD1 assemblies, while Fig. 5 focuses on the highly differentiated ~9Mbp region on LG1 with a substantial number of sex-patterned variants, indicative of a reduction in recombination in a sex determination region that hasexistedforsometime.
The second sex comparison is for an ZZ/WZ sex-determination region on LG3 in a strain of O. aureus [11,49]. This region has not previously been characterized using whole genome sequencing. For this comparison we identified variant alleles fixed in the ZZ male pool and polymorphic in the WZ female pool. Figure 6 shows the FST and the sex-patterned variant allele frequencies for this comparison across the whole O_niloticus_UMD1 assembly, while Fig. 7 focuses on the differentiated region on LG3. O. aureus LG3 contains a large ~50Mbp region of differentiated sex-patterned variants, also indicative of a reduction in recombination in the sex determination region. Figure 6 also shows this differentiation pattern on several other LGs (LG7, LG9, LG14, LG16, LG18, LG22 and LG23). It is possible that these smaller regions of sex-patterned differentiation are actually translocations in O.aureus relative to the O. niloticus genome assembly.
1 C: locale.h
2 python: chr
3 extended ascii
2014-RAxML version 8 -> 2006-RAxML-VI-HPC -> 2005-RAxML-III
=> 1981-Evolutionary Trees from DNA Sequences: A Maximum Likelihood Approach
=> Maximum Likelihood Approach -> statistics
In a simulation study, William D. Beavis showed that the average estimates of phenotypic variances associated with correctly identified QTL were greatly overestimated if only 100 progeny were evaluated, slightly overestimated if 500 progeny were evaluated, and fairly close to the actual magnitude when 1000 progeny were evaluated.
a) Quantitative trait locus (QTL) mapping requires parental strains (red and blue plots) that differ genetically for the trait, such as lines created by divergent artificial selection.
b) The parental lines are crossed to create F1 individuals (not shown), which are then crossed among themselves to create an F2, or crossed to one of the parent lines to create backcross progeny. Both of these crosses produce individuals or strains that contain different fractions of the genome of each parental line. The phenotype for each of these recombinant individuals or lines is assessed, as is the genotype of markers that vary between the parental strains.
c) Statistical techniques such as composite interval mapping evaluate the probability that a marker or an interval between two markers is associated with a QTL affecting the trait, while simultaneously controlling for the effects of other markers on the trait. The results of such an analysis are presented as a plot of the test statistic against the chromosomal map position, in recombination units (cM). Positions of the markers are shown as triangles. The horizontal line marks the significance threshold. Likelihood ratios above this line are formally significant, with the best estimate of QTL positions given by the chromosomal position corresponding to the highest significant likelihood ratio. Thus, the figure shows five possible QTL, with the best-supported QTL around 10 and 60 cM.
MIKAWA Satoshi (美川智博士)
plink –23file JPT-NA19001.snp JPT ID002 –out JPT-NA19001
plink –bfile JPT-NA19001 –exclude merge.missnp –make-bed –out new
plink –bfile source1 –bmerge source2_trial –make-bed –out merged_trial
plink –merge-list merge_list –make-bed –out merge