R2915/SIB-publications9f72c32f6675master
R2915/SIB-publications
9f72c32f6675master
SIB-publications
SIB-publications
README.md
README.md
SIB Publications
Note: this is a snapshot of a simplified version used in SIB and stored in gitlab.sib.swiss
- Applications to obtain SIB publications registered in EuropePMC.org.
- SIB-monthly-publications.py - get specific year-month publications with affiliation 'Swiss Institute of Bioinformatics'
- Aim is to provide a web page source with all publications.
- Docker client is required - Singularity is optional
Usage:
copy the project locally
- Docker
- MAC Users - make sure Docker client is not running
docker rm $(docker ps -a -q) docker rmi $(docker images -q) docker volume rm $(docker volume ls |awk '{print $2}') rm -rf ~/Library/Containers/com.docker.docker/Data/*
create docker image - CentOS 7, python 3.6 and the ICU library to sort unicode strings
cd SIB-publications
start Docker client if necessary, then build the docker image (2-3 minutes)
docker build -t sib-publications .
run the image - by default, all publications of the current year/previous month are retrieved
docker run -v $(pwd)/data:/data sib-publications /data/SIB-monthly-publications.py docker run -v $(pwd)/data:/data sib-publications /data/SIB-monthly-publications.py 2016 4
Results - SIB-monthly-publications.py
- List of all SIB publication IDs:
- requestedYear_dateOfRun-all-SIB-IDs.txt
- Html page for SIB communications:
- requestedYear_dateOfRun-all-SIB-publications.txt
Singularity [optional]:
- Linux Users
- convert the docker image to a singularity compliant image
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/output --privileged -t --rm singularityware/docker2singularity sib-publications
run the image - by default, all publications of the current year/previous month are retrieved
singularity run -B ./data:/data sib-publications.img /data/SIB-monthly-publications.py singularity run -B ./data:/data sib-publications.img /data/SIB-monthly-publications.py 2017 01
- MAC Users - install Singularity/Vagrant
- convert the docker image to a singularity compliant image
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/output --privileged -t --rm singularityware/docker2singularity sib-publications
- mv all necessary files including the newly created singularity compliant image to vagrant directory
- optional - rename image filename
mv sib-publications-2017-06-25-c64d5ab14745.img sib-publications.img
docroot is an additional directory to the standard Vagrant installation
mkdir ~/Desktop/scratch/singularity-vm/docroot mv sib-publications.img ~/Desktop/scratch/singularity-vm/docroot/ # data directory contains # the python script 'SIB-GL-publications.py' # the conf directory containing the file 'list-of-GLs.csv' cp -r data ~/Desktop/scratch/singularity-vm/docroot cd ~/Desktop/scratch/singularity-vm/
- edit the Vagrantfile by adding the following line if necessary
- config.vm.synced_folder "docroot", "/data", :mount_options => ['dmode=775', 'fmode=664']
start or reload vagrant virtual machine
vagrant reload vagrant ssh
from vagrant-console
cd /data
run singularity
(same as Linux above)
Important:
- Needs Docker to create the image and to run the container
c4science · Help