https://github.com/cdcgov/sanitizemepaired
Remove Host Reads from Paired End Sequencing
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Repository
Remove Host Reads from Paired End Sequencing
Basic Info
- Host: GitHub
- Owner: CDCgov
- License: apache-2.0
- Language: Python
- Default Branch: master
- Size: 9.55 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 5
- Open Issues: 0
- Releases: 0
Metadata Files
README.MD
Deprecated. SanitizeMePaired has been included with SanitizeMe at:
https://github.com/CDCgov/SanitizeMe
Remove Host DNA from Paired Reads Using Minimap2 and Samtools
SanitizeMePaired is a GUI application (with an equivalent CLI) that takes paired fastq files, and removes reads mapping to a reference file from the paired fastq files. The most obvious use is to remove the host contaminants from metagenomic sequencing. The GUI version requires direct access to a linux computer or X11 forwarding.

It uses Minimap2 to map to the reference sequence and samtools to pull out the reads that did not map.
SanitizeMePaired depends on Python 3.6.9 and the Gooey and colored modules (for the GUI interface) as well as Minimap2 and Samtools. SanitizeMePaired includes a Conda recipe to install these environmental dependencies (Minimap2, Samtools, Python 3.6.9, and the Gooey/colored modules) in an easy and reproducible fashion using Miniconda/Anaconda.
A script for easy installation of Miniconda is included (install_miniconda.sh).
A script to install Miniconda, download the humang1kv37 reference file, and build the environment is also included (install_all.sh).
Summary - Installation
- Clone Repository
- Install Conda if not already in environment
- Create conda environment
- Acquire reference file - download the humang1kv37 reference file using the following command
wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz
Summary - How to run after installation.
- Activate conda environment -
conda activate SanitizeMePaired - Run GUI version -
~/SanitizeMePaired/SanitizeMePaired_GUI.py - Or run CLI version -
~/SanitizeMePaired/SanitizeMePaired_CLI.py -h - Deactivate conda environment -
conda deactivatewhen finished to protect your conda environment
Clone this code using GIT
Install git for Debian systems using the following command (if necessary)
sudo apt update
sudo apt install git
Installation directions
These instructions install the code into your home path. Change the instructions if appropriate.
Clone the code from repository
cd ~
git clone https://github.com/CDCgov/SanitizeMePaired
or from the latest development at https://github.com/jiangweiyao/SanitizeMePaired
Install Miniconda, Download humang1kv37, and build conda environment
You can do all three things by using the following command. Then, you can skip the next 3 sections.
. ~/SanitizeMePaired/install_all.sh
Install Miniconda (if no Conda is install on system).
You can run the prepackaged script installminiconda.sh to install into your home directory (recommended) by using the following command ``` . ~/SanitizeMePaired/installminiconda.sh ```
Detailed instruction on the the Miniconda website if anything goes wrong: https://conda.io/projects/conda/en/latest/user-guide/install/linux.html
Clone the environment. Need to do once.
We use conda to create an environment (that we can activate and deactivate) to install our dependent software and resolve their dependencies. This environment is called "SanitizeMePaired". The following command assumes your environment file is in your home path. Modify as appropriate.
conda env create -f ~/SanitizeMePaired/environment.yml
The command to generate the environment originally is in the included SanitizeMePaired_MakeCondaEnv.txt file.
Download Reference Files
The humang1kv37 reference file can be downloaded from the link below:
ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/humang1kv37.fasta.gz
with the following command
wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz
You can use any fasta or fasta.gz format reference file for this tool.
Run the code.
Activating your environment makes the software you installed in that environment available for use. You will see "(SanitizeMePaired)" in front of bash after activation.
conda activate SanitizeMePaired
Run the GUI version with the following command. A folder containing test fastq files is included in the SanitizeMePaired/test/ directory. The humang1kv37 reference file is downloaded by the install_all.sh file. Increase or decrease the number of threads to use as well as select your long read technology. Then, hit Start to run the program.
~/SanitizeMePaired/SanitizeMePaired_GUI.py
Run the CLI version with the test files with the following command
~/SanitizeMePaired/SanitizeMePaired_CLI.py -i SanitizeMePaired/test/ -r ~/SanitizeMePaired/human_g1k_v37.fasta.gz -o ~/dehost_output/test_paired_CLI
Get help for the CLI version with the following command
~/SanitizeMePaired/SanitizeMePaired_CLI.py -h
CLI generic usage
~/SanitizeMePaired/SanitizeMePaired_CLI.py -i <input directory contain fastq> -r <reference fasta/fasta.gz> -o <output location>
When you are finished running the workflow, exit out of your environment by running conda deactivate. Deactivating your environment exits out of your current environment and protects it from being modified by other programs. You can build as many environments as you want and enter and exit out of them. Each environment is separate from each other to prevent version or dependency clashes. The author recommends using Conda/Bioconda to manage your dependencies.
Reference Files
The humang1kv37 reference file from NCBI is downloaded by the install_all.sh file . It was downloaded from:
ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/humang1kv37.fasta.gz
You can use any fasta or fasta.gz format reference file for SanitizeMePaired.
What the code is actually doing
The code is running the following commands.
minimap2 -ax sr /home/jyao/SanitizeMe/human_g1k_v37.fasta.gz SanitizeMePaired/test/F3D0_S188_L001_R1_001.fastq SanitizeMePaired/test/F3D0_S188_L001_R2_001.fastq -t 4 > /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001.sam
samtools view -u -f 4 /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001.sam > /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered.sam
samtools bam2fq /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered.sam > /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered.fastq
cat /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered.fastq | grep '^@.*/1$' -A 3 --no-group-separator >/home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered_r1.fastq
cat /home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered.fastq | grep '^@.*/2$' -A 3 --no-group-separator >/home/jyao/dehost_output/test_paired_CLI/F3D0_S188_L001_R1_001_filtered_r2.fastq
Author
Jiangwei Yao
Related Documents
Owner
- Name: Centers for Disease Control and Prevention
- Login: CDCgov
- Kind: organization
- Email: data@cdc.gov
- Location: Atlanta, GA
- Website: http://open.cdc.gov/
- Twitter: CDCgov
- Repositories: 114
- Profile: https://github.com/CDCgov
CDC's collaborative software projects to protect America from health, safety, and security threats, both foreign and in the U.S.
GitHub Events
Total
- Fork event: 3
Last Year
- Fork event: 3
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- _libgcc_mutex 0.1.*
- _openmp_mutex 4.5.*
- atk 2.32.0.*
- bzip2 1.0.8.*
- ca-certificates 2019.11.28.*
- cairo 1.16.0.*
- certifi 2019.11.28.*
- cffi 1.14.0.*
- chardet 3.0.4.*
- colored 1.3.93.*
- cryptography 2.8.*
- expat 2.2.9.*
- fontconfig 2.13.1.*
- freetype 2.10.1.*
- fribidi 1.0.9.*
- gdk-pixbuf 2.38.2.*
- gettext 0.19.8.1.*
- glib 2.58.3.*
- gobject-introspection 1.58.2.*
- gooey 1.0.3.*
- graphite2 1.3.13.*
- gst-plugins-base 1.14.5.*
- gstreamer 1.14.5.*
- gtk2 2.24.32.*
- harfbuzz 2.4.0.*
- htslib 1.10.2.*
- icu 64.2.*
- idna 2.9.*
- jpeg 9c.*
- krb5 1.16.4.*
- ld_impl_linux-64 2.34.*
- libcurl 7.68.0.*
- libdeflate 1.3.*
- libedit 3.1.20170329.*
- libffi 3.2.1.*
- libgcc-ng 9.2.0.*
- libglu 9.0.0.*
- libgomp 9.2.0.*
- libiconv 1.15.*
- libpng 1.6.37.*
- libssh2 1.8.2.*
- libstdcxx-ng 9.2.0.*
- libtiff 4.1.0.*
- libuuid 2.32.1.*
- libwebp-base 1.1.0.*
- libxcb 1.13.*
- libxml2 2.9.10.*
- lz4-c 1.8.3.*
- minimap2 2.17.*
- ncurses 6.1.*
- olefile 0.46.*
- openssl 1.1.1f.*
- pango 1.42.4.*
- pathlib2 2.3.5.*
- pcre 8.44.*
- pillow 7.0.0.*
- pip 20.0.2.*
- pixman 0.38.0.*
- psutil 5.7.0.*
- pthread-stubs 0.4.*
- pycparser 2.20.*
- pyopenssl 19.1.0.*
- pypubsub 4.0.3.*
- pysocks 1.7.1.*
- python 3.6.9.*
- python_abi 3.6.*
- readline 8.0.*
- requests 2.23.0.*
- samtools 1.10.*
- setuptools 46.1.3.*
- six 1.14.0.*
- sqlite 3.30.1.*
- tk 8.6.10.*
- urllib3 1.25.7.*
- wheel 0.34.2.*
- wxpython 4.0.7.post2.*
- xorg-kbproto 1.0.7.*
- xorg-libice 1.0.10.*
- xorg-libsm 1.2.3.*
- xorg-libx11 1.6.9.*
- xorg-libxau 1.0.9.*
- xorg-libxdmcp 1.1.3.*
- xorg-libxext 1.3.4.*
- xorg-libxrender 0.9.10.*
- xorg-renderproto 0.11.1.*
- xorg-xextproto 7.3.0.*
- xorg-xproto 7.0.31.*
- xz 5.2.4.*
- zlib 1.2.11.*
- zstd 1.4.4.*