Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
Use argparse instead of optparse for CL handling in R. Update Makefil…
Browse files Browse the repository at this point in the history
…e, README, anaconda environment and comput_PI.R accordingly.
  • Loading branch information
cmdoret committed Jul 30, 2018
1 parent d6a4b5c commit 91702b9
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 137 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ wgs_qc : $(WGS)/mapped $(WGS)/raw
wgs_wild : $(CORRESP) $(SIZES) $(WGS)/variant/hap.wild.matrix
# Compute PI diversity in sliding windows
Rscript src/wgs_wild/compute_PI.R \
-i $(WGS)/variant/hap.wild.matrix.txt \
-o $(WGS)/stats/win_w100_t10_PI.tsv \
-m 'window' \
--in $(WGS)/variant/hap.wild.matrix.txt \
--out $(WGS)/stats/win_w100_t10_PI.tsv \
--mode 'window' \
--step_size 10 \
--win_size 100
# Compute PI diversity per site
Rscript src/wgs_wild/compute_PI.R
-i $(WGS)/variant/hap.wild.matrix.txt \
-o $(WGS)/stats/sites_PI.tsv \
-m 'site'
--in $(WGS)/variant/hap.wild.matrix.txt \
--out $(WGS)/stats/sites_PI.tsv \
--mode 'site'

####################
#### MISC RULES ####
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ These dependencies are required to run the main analysis. This include the RADse
* [VCFtools 0.1.15](https://vcftools.github.io/)
* [BEDtools 2.26](https://bedtools.readthedocs.io/)
* [Trimmomatic 0.36](https://usadellab.org/cms/?page=trimmomatic)
* [R 3.4.1](https://www.r-project.org/)
+ [tidyverse 1.1.1](https://www.tidyverse.org)
* [R 3.4.3](https://www.r-project.org/)
+ [tidyverse 1.2.1](https://www.tidyverse.org)
+ [zoo 1.8.0](https://cran.r-project.org/web/packages/zoo/index.html)
+ [Rcpp 0.12.11](https://cran.r-project.org/web/packages/Rcpp/)
+ [Rcpp 0.12.14](https://cran.r-project.org/web/packages/Rcpp/)
+ [RcppRoll 0.2.2](https://cran.r-project.org/web/packages/RcppRoll/)
+ [viridis 0.4.0](https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html)
+ [optparse 1.6.0](https://cran.r-project.org/web/packages/optparse)
+ [argparse 1.1.0](https://cran.r-project.org/web/packages/argparse/index.html)
+ [gridExtra 2.3](https://cran.r-project.org/web/packages/gridExtra/index.html)
* [Python 2.7.x](https://www.python.org/)
+ [numpy 1.11](https://www.numpy.org/)
Expand Down
220 changes: 130 additions & 90 deletions docs/csd_env_conda.yml
Original file line number Diff line number Diff line change
@@ -1,130 +1,169 @@
name: csd_env
channels:
- conda-forge
- r
- defaults
dependencies:
- ca-certificates=2018.4.16=0
- certifi=2018.4.16=py27_0
- icu=58.2=hfc679d8_0
- libpng=1.6.28=2
- libtiff=4.0.7=1
- openssl=1.0.2o=h470a237_1
- pyqt=4.11.4=py27_3
- r-base=3.4.1=2
- r-getopt=1.20.2=r3.4.1_0
- r-optparse=1.6.0=r341_0
- r-rcpproll=0.2.2=r3.4.1_0
- sip=4.18=py27_1
- _r-mutex=1.0.0=mro_2
- binutils_impl_linux-64=2.28.1=had2808c_3
- binutils_linux-64=7.2.0=had2808c_27
- biopython=1.72=py27h04863e7_0
- blas=1.0=mkl
- bwidget=1.9.11=0
- bzip2=1.0.6=h14c3975_5
- cairo=1.14.8=0
- ca-certificates=2018.03.07=0
- cairo=1.14.12=h8948797_3
- certifi=2018.4.16=py27_0
- curl=7.61.0=h84994c4_0
- cycler=0.10.0=py27_0
- dbus=1.10.20=0
- dbus=1.13.2=h714fa37_1
- expat=2.2.5=he0dffb1_0
- fontconfig=2.12.1=3
- freetype=2.5.5=2
- glib=2.50.2=1
- fontconfig=2.13.0=h9420a91_0
- freetype=2.9.1=h8a8886c_0
- fribidi=1.0.4=h14c3975_0
- gcc_impl_linux-64=7.2.0=habb00fd_3
- gcc_linux-64=7.2.0=h550dcbe_27
- gfortran_impl_linux-64=7.2.0=hdf63c60_3
- gfortran_linux-64=7.2.0=h550dcbe_27
- glib=2.56.1=h000015b_0
- graphite2=1.3.11=h16798f4_2
- gsl=2.4=h14c3975_4
- gst-plugins-base=1.8.0=0
- gstreamer=1.8.0=0
- harfbuzz=0.9.39=2
- gst-plugins-base=1.14.0=hbbd80ab_1
- gstreamer=1.14.0=hb453b48_1
- gxx_impl_linux-64=7.2.0=hdf63c60_3
- gxx_linux-64=7.2.0=h550dcbe_27
- harfbuzz=1.8.4=hec2c2bc_0
- icu=58.2=h9c2bf20_1
- intel-openmp=2018.0.3=0
- jpeg=9b=h024ee3a_2
- krb5=1.14.2=hcdc1b81_6
- libcurl=7.61.0=h1ad7b7a_0
- libedit=3.1=heed3624_0
- libffi=3.2.1=hd88cf55_4
- libgcc=7.2.0=h69d50b8_2
- libgcc-ng=7.2.0=hdf63c60_3
- libgfortran-ng=7.2.0=hdf63c60_3
- libiconv=1.14=0
- libopenblas=0.2.20=h9ac9557_7
- libpng=1.6.34=hb9fc6fc_0
- libssh2=1.8.0=h9cfc8f7_4
- libstdcxx-ng=7.2.0=hdf63c60_3
- libtiff=4.0.9=he85c1e1_1
- libuuid=1.0.3=h1bed415_2
- libxcb=1.13=h1bed415_1
- libxml2=2.9.4=0
- matplotlib=1.5.1=np111py27_0
- libxml2=2.9.8=h26e45fe_1
- mkl=2018.0.3=1
- ncurses=5.9=10
- ncurses=6.0=h9df7e31_2
- numpy=1.11.3=py27h1b885b7_9
- numpy-base=1.11.3=py27h3dfced4_9
- openssl=1.0.2o=h20670df_0
- pandas=0.19.2=np111py27_1
- pango=1.40.3=1
- pcre=8.39=1
- pango=1.42.2=h8589676_0
- pcre=8.42=h439df22_0
- pip=10.0.1=py27_0
- pixman=0.34.0=hceecf20_3
- pycairo=1.13.3=py27hea6d626_0
- pyparsing=2.2.0=py27_1
- python=2.7.13=0
- pyqt=5.9.2=py27h22d08a2_0
- python=2.7.15=h1571d57_0
- python-dateutil=2.7.3=py27_0
- pytz=2018.5=py27_0
- qt=4.8.7=4
- r-assertthat=0.2.0=r3.4.1_0
- r-bh=1.62.0_1=r3.4.1_0
- r-bindr=0.1=r3.4.1_0
- r-bindrcpp=0.2=r3.4.1_0
- r-broom=0.4.2=r3.4.1_0
- r-cellranger=1.1.0=r3.4.1_0
- r-colorspace=1.3_2=r3.4.1_0
- r-curl=2.6=r3.4.1_0
- r-dichromat=2.0_0=r3.4.1_2
- r-digest=0.6.12=r3.4.1_0
- r-dplyr=0.7.0=r3.4.1_0
- r-forcats=0.2.0=r3.4.1_0
- r-foreign=0.8_68=r3.4.1_0
- r-ggplot2=2.2.1=r3.4.1_0
- r-glue=1.1.1=r3.4.1_0
- r-gridextra=2.2.1=r3.4.1_0
- r-gtable=0.2.0=r3.4.1_0
- r-haven=1.0.0=r3.4.1_0
- r-hms=0.3=r3.4.1_0
- r-httr=1.2.1=r3.4.1_0
- r-jsonlite=1.5=r3.4.1_0
- r-labeling=0.3=r3.4.1_2
- r-lattice=0.20_35=r3.4.1_0
- r-lazyeval=0.2.0=r3.4.1_0
- r-lubridate=1.6.0=r3.4.1_0
- r-magrittr=1.5=r3.4.1_2
- r-mass=7.3_47=r3.4.1_0
- r-mime=0.5=r3.4.1_0
- r-mnormt=1.5_5=r3.4.1_0
- r-modelr=0.1.0=r3.4.1_0
- r-munsell=0.4.3=r3.4.1_0
- r-nlme=3.1_131=r3.4.1_0
- r-openssl=0.9.6=r3.4.1_0
- r-pkgconfig=2.0.1=r3.4.1_0
- r-plogr=0.1_1=r3.4.1_0
- r-plyr=1.8.4=r3.4.1_0
- r-psych=1.7.5=r3.4.1_0
- r-purrr=0.2.2.2=r3.4.1_0
- r-r6=2.2.1=r3.4.1_0
- r-rcolorbrewer=1.1_2=r3.4.1_3
- r-rcpp=0.12.11=r3.4.1_0
- r-readr=1.1.1=r3.4.1_0
- r-readxl=1.0.0=r3.4.1_0
- r-rematch=1.0.1=r3.4.1_0
- r-reshape2=1.4.2=r3.4.1_0
- r-rlang=0.1.1=r3.4.1_0
- r-rvest=0.3.2=r3.4.1_0
- r-scales=0.4.1=r3.4.1_0
- r-selectr=0.3_1=r3.4.1_0
- r-stringi=1.1.5=r3.4.1_0
- r-stringr=1.2.0=r3.4.1_0
- r-tibble=1.3.3=r3.4.1_0
- r-tidyr=0.6.3=r3.4.1_0
- r-tidyverse=1.1.1=r3.4.1_0
- r-viridis=0.4.0=r3.4.1_0
- r-viridislite=0.2.0=r3.4.1_0
- r-xml2=1.1.1=r3.4.1_0
- r-zoo=1.8_0=r3.4.1_0
- readline=6.2=2
- qt=5.9.6=h52aff34_0
- readline=7.0=ha6073c6_4
- setuptools=39.2.0=py27_0
- sip=4.19.8=py27hf484d3e_0
- six=1.11.0=py27_1
- sqlite=3.13.0=0
- tk=8.5.18=0
- sqlite=3.23.1=he433501_0
- tk=8.6.7=hc745277_3
- tktable=2.10=h14c3975_0
- wheel=0.31.1=py27_0
- xz=5.2.4=h14c3975_4
- zlib=1.2.11=ha838bed_2
- _r-mutex=1.0.0=anacondar_1
- r-argparse=1.1.0=r343h889e2dd_0
- r-assertthat=0.2.0=r343h889e2dd_0
- r-backports=1.1.2=r343h086d26f_0
- r-base=3.4.3=h290ecf8_1
- r-base64enc=0.1_3=r343h086d26f_4
- r-bh=1.65.0_1=r343h889e2dd_0
- r-bindr=0.1=r343h889e2dd_0
- r-bindrcpp=0.2=r343h599a50d_0
- r-broom=0.4.3=r343h889e2dd_0
- r-callr=1.0.0=r343h889e2dd_0
- r-cellranger=1.1.0=r343h889e2dd_0
- r-cli=1.0.0=r343h889e2dd_0
- r-clipr=0.4.0=r343h889e2dd_0
- r-colorspace=1.3_2=r343h086d26f_0
- r-crayon=1.3.4=r343h889e2dd_0
- r-curl=3.1=r343h086d26f_0
- r-dbi=0.7=r343h889e2dd_0
- r-dbplyr=1.1.0=r343h889e2dd_0
- r-dichromat=2.0_0=r343h889e2dd_4
- r-digest=0.6.13=r343h086d26f_0
- r-dplyr=0.7.4=r343h599a50d_0
- r-evaluate=0.10.1=r343h889e2dd_0
- r-findpython=1.0.3=r343h889e2dd_0
- r-forcats=0.2.0=r343h889e2dd_0
- r-foreign=0.8_69=r343h086d26f_0
- r-getopt=1.20.1=r343h889e2dd_0
- r-ggplot2=2.2.1=r343h889e2dd_0
- r-glue=1.2.0=r343h086d26f_0
- r-gridextra=2.3=r343h889e2dd_0
- r-gtable=0.2.0=r343h889e2dd_0
- r-haven=1.1.0=r343h599a50d_0
- r-highr=0.6=r343h889e2dd_0
- r-hms=0.4.0=r343h889e2dd_0
- r-htmltools=0.3.6=r343h599a50d_0
- r-httr=1.3.1=r343h889e2dd_0
- r-jsonlite=1.5=r343h086d26f_0
- r-knitr=1.18=r343h889e2dd_0
- r-labeling=0.3=r343h889e2dd_4
- r-lattice=0.20_35=r343h086d26f_0
- r-lazyeval=0.2.1=r343h086d26f_0
- r-lubridate=1.7.1=r343h599a50d_0
- r-magrittr=1.5=r343h889e2dd_4
- r-markdown=0.8=r343h086d26f_0
- r-mass=7.3_48=r343h086d26f_0
- r-mime=0.5=r343h086d26f_0
- r-mnormt=1.5_5=r343h4829c52_0
- r-modelr=0.1.1=r343h889e2dd_0
- r-munsell=0.4.3=r343h889e2dd_0
- r-nlme=3.1_131=r343h4829c52_0
- r-openssl=0.9.9=r343h086d26f_0
- r-pillar=1.0.1=r343h889e2dd_0
- r-pkgconfig=2.0.1=r343h889e2dd_0
- r-plogr=0.1_1=r343h889e2dd_0
- r-plyr=1.8.4=r343h599a50d_0
- r-proto=1.0.0=r343h889e2dd_0
- r-psych=1.7.8=r343h889e2dd_0
- r-purrr=0.2.4=r343h086d26f_0
- r-r6=2.2.2=r343h889e2dd_0
- r-rcolorbrewer=1.1_2=r343h889e2dd_0
- r-rcpp=0.12.14=r343h599a50d_0
- r-rcpproll=0.2.2=r343h599a50d_0
- r-readr=1.1.1=r343h599a50d_0
- r-readxl=1.0.0=r343h599a50d_0
- r-rematch=1.0.1=r343h889e2dd_0
- r-reprex=0.1.1=r343h889e2dd_0
- r-reshape2=1.4.3=r343h599a50d_0
- r-rlang=0.1.6=r343h086d26f_0
- r-rmarkdown=1.8=r343h889e2dd_0
- r-rprojroot=1.3_1=r343h889e2dd_0
- r-rstudioapi=0.7=r343h889e2dd_0
- r-rvest=0.3.2=r343h889e2dd_0
- r-scales=0.5.0=r343h599a50d_0
- r-selectr=0.3_1=r343h889e2dd_0
- r-stringi=1.1.6=r343h599a50d_0
- r-stringr=1.2.0=r343h889e2dd_0
- r-tibble=1.4.1=r343h086d26f_0
- r-tidyr=0.7.2=r343h599a50d_0
- r-tidyselect=0.2.3=r343h599a50d_0
- r-tidyverse=1.2.1=r343h889e2dd_0
- r-utf8=1.1.2=r343h086d26f_0
- r-viridis=0.4.0=r343h889e2dd_0
- r-viridislite=0.2.0=r343h889e2dd_0
- r-whisker=0.3_2=r343h889e2dd_4
- r-xml2=1.1.1=r343h599a50d_0
- r-yaml=2.1.16=r343h086d26f_0
- r-zoo=1.8_0=r343h086d26f_0
- pip:
- backports.shutil-get-terminal-size==1.0.0
- enum34==1.1.6
Expand All @@ -143,3 +182,4 @@ dependencies:
- simplegeneric==0.8.1
- traitlets==4.3.2
- wcwidth==0.1.7
prefix: /home/cyril/Software/anaconda3/envs/csd_env
Loading

0 comments on commit 91702b9

Please sign in to comment.