Code Monkey home page Code Monkey logo

confindr's Introduction

Build status PyPI version install with bioconda

ConFindr

This program is designed to find bacterial intra-species contamination in raw Illumina data. It does this by looking for multiple alleles of core, single copy genes.

For complete instructions on installation and usage, please visit the ConFindr github pages site.

Important Note

ConFindr has only been validated using rMLST databases. Please use them if possible. Installation instructions can be found here

Quickstart

To install ConFindr, use conda (see here for instructions on getting bioconda set up):

conda install -c bioconda confindr

Note that we are aware of some issues with installing ConFindr via conda with Python 3.8. Until this is resolved, if you run into any issues, please try using Python 3.7.

To get an example dataset, use this command, which will create a folder called example-data in your current working directory:

wget https://ndownloader.figshare.com/files/9972709 && tar xf 9972709 && rm 9972709

As of version 0.7.0 ConFindr can run automatically on Escherichia, Salmonella, and Listeria with no further work on your part - just run:

confindr.py -i example-data -o example-out

To use the recommended rMLST database (after installation)

confindr.py -i example-data -o example-out --rmlst

Once ConFindr finishes running, take a look at the confindr_report.csv file found in example-out - it shows that multiple alleles were found for many sites within the genes that ConFindr examines, meaning that this sample is quite contaminated!

If you want to run ConFindr on genera other than the 3 listed above, you'll need to get access to and download rMLST databases. You can find instructions on how to do that here.

Running ConFindr in a Python Script

If you want to run ConFindr from within a script instead of running from the command line, here's how:

from confindr_src import confindr

# Find read files.
paired_reads = confindr.find_paired_reads('path_to_fastq_folder', forward_id='_R1', reverse_id='_R2')
# Run confindr. This assumes that you have already downloaded the databases. If you haven't,
# you can run confindr.check_for_databases_and_download(database_location='path/where/you/want/to/download, tmpdir='a/tmp/dir')
for pair in paired_reads:
    confindr.find_contamination(pair=pair,
                                forward_id='_R1', # change if yours is different
                                threads=4, 
                                output_folder='path/to/output',
                                databases_folder='path/to/databases')
                                

Reporting Issues

If you have any problems installing or running ConFindr, or have feature request, please open an issue here on GitHub.

Citing ConFindr

ConFindr has been published in PeerJ - if you use it in your work, please cite the following:

Low AJ, Koziol AG, Manninger PA, Blais B, Carrillo CD. 2019. ConFindr: rapid detection of intraspecies and cross-species contamination in bacterial whole-genome sequence data. PeerJ 7:e6995 https://doi.org/10.7717/peerj.6995

confindr's People

Contributors

adamkoziol avatar antunderwood avatar kjolley avatar lowandrew avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.