ANGSD: Analysis of next generation Sequencing Data

Latest tar.gz version is (0.938/0.939 on github), see Change_log for changes, and download it here.

User:Thorfinn: Difference between revisions

From angsd
Jump to navigation Jump to search
 
(56 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=ms and psmc stuff=
./msHOT-lite 2 20 -t 30000 -r 6000 30000000 -eN 0.01 0.1 -eN 0.06 1 -eN 0.2 0.5 -eN 1 1 -eN 2 2 -l


#Thetas,Tajima,Neutrality test needs documentation and examples files
N0=theta/regionsize/4/u


30000.0/30000000.0/4.0/u=10000


#doMajorMinor 4 fjerner sites som ikke har major/minor som ref. total maerkeligt og fucked up
from ms to realtime and realsize
#user custom class missing
 
tk are times from ms e.g. 0.01,0.06,0.2,1,2
 
alpha are sizes from ms e.g. 0.1,1,0.5,1,2
 
truetimes in years
 
4*g*N0*tk
 
from ms to real populationsize
 
alpha*N0
 
from psmc to realtime and realsize:
 
PA 4+25*2+4+6 0.026254885 0.003600825 21.895293401 5.782425186 2.106578468 0.452471596 0.479814497 0.401498376 0.367130222 0.302637758 0.336141050 0.585819704 1.405835053 2.909550136 4.044915857 4.137850214 3.776532973 3.123633638 2.466466904 2.013826351 1.792827385 1.762345431 1.839956170 1.916823191 1.921452795 1.902858530 2.051184729 2.597031978 3.508703366 4.125487051 6.375234256
 
Theta is third value.


#-samglfclean not documented
N0=theta/2/u/s


#soap usage is not documented
from psmc time to realtime


2*g*N0*times


#-sites does not work without all chromsomes being in the *sites file
from psmc time to realtime
#-sites gives wrong chromomosome in error


N0*lambda


#phat does not work alone (-doMaf 8)
=Wiki doc=
# check userdir is writable
# write how on website: Thetas,Tajima,Neutrality test needs documentation and examples files
#user custom class missing


# make haploid 1dsfs
=Code fix/cleanup=
# fix wiki doc with -sites should contain -rf with curs from -sites
#if(doMajorMinor==4&&refToInt[pars->anc[s]]==4) in analysisMajorMinor tsk 7april ?
#describe -trim! does trim 3 remove the first and last 3 bases? or just 2?
# don't quit program if a chr is not included in the -sites file
#check all getoptions stderr output.
# from morten shitoutput  
# from morten shitoutput  
<pre>
h1 h2 h3 = 7 10 5  has less than 3 blocks. skipping
h1 h2 h3 = 7 10 5  has less than 3 blocks. skipping
h1 h2 h3 = 8 10 5  has less than 3 blocks. skipping
h1 h2 h3 = 8 10 5  has less than 3 blocks. skipping
Line 32: Line 58:
h1 h2 h3 = 9 10 6  has less than 3 blocks. skipping
h1 h2 h3 = 9 10 6  has less than 3 blocks. skipping
h1…
h1…
</pre>


# fix -doFasta for single chromosomes. put gzwrite && bufstr.l =0 whenever we change cur
=Addtional methods and functionality=
 
# make haploid 1dsfs
#-doMaf 4 is not working if post is not external
 
#Regarding an open issue of printing %e instead o numbers, using the bombyx/lyca dataset:
 
#fix  }else{
    fprintf(stderr,"./a.out [make_bed|do_stat|validate_bed|print]\n");
  }  in thetaStat
# simplefy filereading. from glf files
# simplefy filereading. from glf files
 
# fix -doFasta for single chromosomes.
# check 1offseted in -sites file
# add more info to -sites file output
 
# better screen output if unsorted filtering
 
 
=Anders changes to version 583=
1)
Default minMaf set to -1 (instead of 0)
 
2)
added
  freqs->freq = new double[pars->numSites];
to phatLoop
 
added the if part of
if(freq->freq==NULL)
  freq->freq = new double[pars->numSites];
to postFreq and likeFreq funcitons
to stop leak + be able to run phat without postFreq/likeFreq
 
3)
changed doMajorMinor 2 to choose a minor allele even if no minor allele is observed (if -minMaf is chosen the site will be removed). This avoid removing side through the majorMinorMod function. The change
else if (bases[i]>temp){
->
else if (bases[i]>=temp){
in majorMinorCounts
 
4)
Estimate nInd even if -minInd 0. Else the output is wrong when -minInd 0
filter::run changed
 
e.g.
 
$ANG -out out -doMajorMinor 2 -doMaf 8 -bam bam.filelist -doCounts 1 -r 1:
before
gunzip -c out.mafs.gz | headchromo position major minor phat nInd
1 13999919 A T 0.000000 10
1 13999920 G T 0.000000 10
1 13999921 G T 0.000000 10
1 13999922 C T 0.000000 10
after
chromo position major minor phat nInd
1 13999919 A T 0.000000 1
1 13999920 G T 0.000000 1
1 13999921 G T 0.000000 1
1 13999922 C T 0.000000 1
1 13999923 A T 0.000000 1
(there is only information for one individual)

Latest revision as of 00:13, 26 January 2018

ms and psmc stuff

./msHOT-lite 2 20 -t 30000 -r 6000 30000000 -eN 0.01 0.1 -eN 0.06 1 -eN 0.2 0.5 -eN 1 1 -eN 2 2 -l

N0=theta/regionsize/4/u

30000.0/30000000.0/4.0/u=10000

from ms to realtime and realsize

tk are times from ms e.g. 0.01,0.06,0.2,1,2

alpha are sizes from ms e.g. 0.1,1,0.5,1,2

truetimes in years

4*g*N0*tk

from ms to real populationsize

alpha*N0

from psmc to realtime and realsize:

PA 4+25*2+4+6 0.026254885 0.003600825 21.895293401 5.782425186 2.106578468 0.452471596 0.479814497 0.401498376 0.367130222 0.302637758 0.336141050 0.585819704 1.405835053 2.909550136 4.044915857 4.137850214 3.776532973 3.123633638 2.466466904 2.013826351 1.792827385 1.762345431 1.839956170 1.916823191 1.921452795 1.902858530 2.051184729 2.597031978 3.508703366 4.125487051 6.375234256

Theta is third value.

N0=theta/2/u/s

from psmc time to realtime

2*g*N0*times

from psmc time to realtime

N0*lambda

Wiki doc

  1. check userdir is writable
  2. write how on website: Thetas,Tajima,Neutrality test needs documentation and examples files
  3. user custom class missing

Code fix/cleanup

  1. if(doMajorMinor==4&&refToInt[pars->anc[s]]==4) in analysisMajorMinor tsk 7april ?
  2. don't quit program if a chr is not included in the -sites file
  3. check all getoptions stderr output.
  4. from morten shitoutput
h1 h2 h3 = 7 10 5  has less than 3 blocks. skipping
h1 h2 h3 = 8 10 5  has less than 3 blocks. skipping
h1 h2 h3 = 10 11 5  has less than 3 blocks. skipping
h1 h2 h3 = 7 12 5  has less than 3 blocks. skipping
h1 h2 h3 = 10 12 5  has less than 3 blocks. skipping
h1 h2 h3 = 10 13 5  has less than 3 blocks. skipping
h1 h2 h3 = 10 15 5  has less than 3 blocks. skipping
h1 h2 h3 = 7 10 6  has less than 3 blocks. skipping
h1 h2 h3 = 8 10 6  has less than 3 blocks. skipping
h1 h2 h3 = 9 10 6  has less than 3 blocks. skipping
h1…

Addtional methods and functionality

  1. make haploid 1dsfs
  2. simplefy filereading. from glf files
  3. fix -doFasta for single chromosomes.