Package: winston-cleaner
WinstonCleanerWinstonCleaner is a software tool for detecting and removing cross-contaminated
contigs from assembled transcriptomes. The program uses BLAST to identify
suspicious contigs and RPKM values to sort these as either correct or
contamination.RequirementsTo run WinstonCleaner, the following requirements must be satisfied:Python 2.7blastbbtools(pileup.sh)bowtie2InstallationCheckout repositorygit clone https://github.com/kolecko007/WinstonCleaner.gitcd WinstonCleanerInstall pip dependencies:pip2 install --user -r requirements.txtInitialize settings:cp config/settings.yml.default config/settings.ymlCheck installation by runningtest/integration/run.shfromWinstonCleanerfolderQuick StartPrepare the folder with input data and an empty folder for the resultsOpenconfig/settings.ymland specify input and output pathsbin/prepare_data.pybin/find_contaminations.pyInspect the results in the output folderUsageInputThe input data should be presented as a set of triads of files for each dataset.
For each dataset it is necessary to prepare:left reads.fastqright reads.fastqassembled transcriptome.fastafileNames of the files must be in the following format:NAME_1.fastqNAME_2.fastqNAME.fastaFor example:brucei_1.fastqbrucei_2.fastqbrucei.fastagiardia_1.fastqgiardia_2.fastqgiardia.fastaFor file names only letters, digits and_symbols are allowed.All the files must be placed together in one folder.ConfigurationAll the settings are declared inconfig/settings.yml.winston.paths.input— input folder with reads and contigswinston.paths.output— output folder with the resultswinston.paths.tools.pileup_sh— (optional) bbtoolspileup.shexecution commandwinston.paths.tools.bowtie2— (optional) bowtie2 execution commandwinston.paths.tools.bowtie2_build— (optional) bowtie2-build execution commandwinston.hits_filtering.len_ratio— minimalqcovhspfor hits filteringwinston.hits_filtering.len_minimum— minimal hit lenth for hits filteringwinston.coverage_ratio.regular— coverage ratio for REGULAR dataset pair type
(lower values make contamination prediction more strict, less contaminations will be found)winston.coverage_ratio.close— coverage ratio for CLOSE dataset pair typewinston.threads.multithreading— enable multithreading (disabling is convenient for debugging purposes)winston.threads.count— number of threads if multithreading enabledwinston.tools.blast.threads— number of threads for BLAST processingwinston.tools.bowtie.threads— number of threads for bowtie2 processingwinston.in_memory_db— load coverage database to RAM in the beginning.
Makes contamination lookup faster, but requires decent amount of memory.The default configuration can be found in fileconfig/settings.yml.default.winston:
  in_memory_db: false

  paths:
    input: /path/to/folder/with/data/
    output: /path/to/output/folder

  hits_filtering:
    len_ratio: 70
    len_minimum: 100

  coverage_ratio:
    REGULAR: 1.1
    CLOSE: 0.04

  threads:
    multithreading:  true
    count:   8

  tools:
    blast:
      threads: 8
    bowtie:
      threads: 8Data preparationThe first step is to prepare the data for WinstonCleaner processing.bin/prepare_data.pyThe result will be stored in the folder, specified inwinston.paths.outputoption.After the preparation the filetypes.csvcan be inspected and edited.
It contains all possible combinations of dataset pairs and their types.The default types are:CLOSE- taxonomically close organismsREGULAR- simple pair of organismsIntypes.csvthere can also be specified any amount of custom types.
Their names must be in upper case.predator,prey,95.0,LEFT_EATS_RIGHT
prey,predator,95.0,RIGHT_EATS_LEFTIn these case coverage ratio for each custom type must be specified inwinston.coverage_ratiosection ofsettings.ymlfile:...
  coverage_ratio:
    REGULAR: 1.1
    CLOSE: 0.04
    LEFT_EATS_RIGHT: 10
    RIGHT_EATS_LEFT: 0.1
...Contamination cleanupbin/find_contaminations.pyOutputThe results will be saved in the folder, specified inwinston.paths.outputoption.For each datasets there will be the following structure of files.DATASET_NAME_clean.fasta— clean contigsDATASET_NAME_deleted.fasta— contaminated contigsDATASET_NAME_suspicious_hits.csv— all suspicious BLAST hitsDATASET_NAME_contamination_sources.csv—
sources of contaminations with a following columns: source contamination dataset name, number of sequencesDATASET_NAME_contaminations.csv— list of blast hits from which contaminations were detectedDATASET_NAME_missing_coverage.csv— list of contig ids without a coverageTODOMoving to python3Logging systemExtended testingexport to graph format