Coder Social home page Coder Social logo

ffpolish's Introduction

FFPolish

Filters Artifacts From Formalin-Fixed Paraffin-Embedded (FFPE) Variants

Installation

Conda Installation

Ensure that you have the conda-forge and bioconda channels in the correct priority order.

conda config --show channels
channels:
  - conda-forge
  - bioconda
  - defaults

If the above command doesn't have the correct output, run:

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

To create a new environment named ffpolish with FFPolish installed, run:

conda create -n ffpolish -c matnguyen ffpolish

Activate the environment

source activate ffpolish

And run FFPolish, producing the help output

ffpolish -h

Running FFPolish

Filtering VCF

You can filter artifacts from a VCF using the pre-trained model.

Input Requirements

  • A reference genome in FASTA format
  • A bgzipped VCF file of FFPE variants
  • A BAM file of the FFPE tumour

Command

The available options are:

  • -o/--outdir - the output directory (default: current directory)
  • -p/--prefix - the output prefix (default: basename of the BAM)

FFPolish can be run with the following command and outputs a filtered vcf out_filtered.vcf:

ffpolish filter -o outfolder -p out reference.fa vcf.gz tumour.bam

Retraining Model With New Data

We recommend that if you have ground truth data (paired FFPE and fresh frozen tumours), you should create your own dataset to augment the included training set at least with a partial subset of your data.

Input Requirements

  • A reference genome in FASTA format
  • A bgzipped VCF file of FFPE variants
  • A BAM file of the FFPE tumour
  • A tab-delimited file of true variants
  • Output directory

Tab delimited format:

Column Definition
chr Chromosome
start Start position
end End position
ref Reference allele
alt Alternate allele

Command

The available options are:

  • -p/--prefix - the output prefix (default: basename of the BAM)
ffpolish extract -p out reference.fa vcf.gz tumour.bam labels.tsv outdir

ffpolish's People

Contributors

matnguyen avatar

Stargazers

Kiran Krishnamachari avatar Darryl Nousome avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

ffpolish's Issues

Add bedops to conda recipe

cli.py filter requires vcf2bed, which is provided by the bedops package, but is not installed by default through conda

Python Version Issue

FFPolish appears to be written for version 3.8 (the new := operator was used), but requires version 3.7.8

When I tried to install FFPolish with python version 3.8, I get an error:
Looking for: ['ffpolish', 'python=3.8']
Encountered problems while solving:

  • package ffpolish-0.1.0-py37_1 requires python 3.7.8.*, but none of the providers can be installed

When I installed FFPolish with python version 3.7.8, I get an error when I attempt to use FFPolish
(base) bash-4.4$ conda activate ffpolish
(ffpolish) bash-4.4$ which ffpolish
/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/bin/ffpolish
(ffpolish) bash-4.4$ python --version
Python 3.7.8
(ffpolish) bash-4.4$ ffpolish --help
Traceback (most recent call last):
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/bin/ffpolish", line 5, in
from filter import filter
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/bin/filter.py", line 11, in
import vaex
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/vaex/init.py", line 40, in
import vaex.dataframe
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/vaex/dataframe.py", line 17, in
import vaex.utils
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/vaex/utils.py", line 19, in
import progressbar
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/progressbar/init.py", line 5, in
from .bar import DataTransferBar
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/progressbar/bar.py", line 13, in
from python_utils import types
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/python_utils/init.py", line 1, in
from . import (
File "/scratch/users/astar/gis/simngl/apps/bcbio/v129/anaconda/envs/ffpolish/lib/python3.7/site-packages/python_utils/converters.py", line 89
if match := regexp.search(input_):
^
SyntaxError: invalid syntax

Unable to install FFPolish using conda

I am trying to install FFPolish using conda v22.9 (conda install -c matnguyen ffpolish) but it keeps loading for a long time without success (see output below). I have tried installing on it different machines without success. I believe my conda installation is fine as I use it without issues otherwise.

$ conda install -c matnguyen ffpolish
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: | 

I have the necessary channels configured:

$ conda config --show channels
channels:
  - conda-forge
  - bioconda
  - defaults

Is it possible to directly download the FFPolish repository from Github and install using this script: https://github.com/morinlab/FFPolish/blob/master/conda/build.sh?

License

Hi what is the license on this code and can you please include it in the repo?

BAM/CRAM?

Hello,

Is possible to use as input CRAM rather than BAM files?

Thanks,
Mike

INDELs

Hi, thank you very much for providing this tool. It might be quite useful.
Can you please let me know if it also handles INDELs in the input FFPE VCF or only works with SNVs?

Thanks!

Won-Chul

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.