Fraggler is for fragment analysis in Python! Fraggler is a Python package that provides functionality for analyzing and generating reports for fsa files. It offers both a Python API and a command-line tool.
Peak Area Report Generation
: Fraggler allows you to generate peak area reports for all input files. The package calculates peak areas based on specified parameters and generates a report summarizing the results.
Combined Peak Table Generation
: Fraggler provides a command-line tool to generate a combined dataframe of peaks for all input files. This allows you to easily analyze and compare peaks across multiple files.
Customization Options
: Fraggler offers various customization options to tailor the analysis to your specific needs. You can specify parameters such as ladder type, peak model, minimum ratio, minimum height, cutoff value, trace channel, peak height, and even provide a custom peaks file for specific assays and intervals.
pip install fraggler
Fraggler depends on:
- pandas
- numpy
- scikit-learn
- networkx
- lmfit
- scipy
- biopython
- panel
- fire
- colorama
- altair
To get an overview how the library can be used in a python environment, please look at the tutorial.ipynb.
To generate peak area reports and a peak table for all input files, use the fraggler area
or fraggler peak
command followed by the required positional arguments and any optional flags.
- If not specified, fraggler finds peaks agnostic in the
fsa file
. To specifiy custom assays with certain peaks and intervals, the user can add a .csv file to the--custom_peaks
argument. The csv file MUST have the following shape:
name | start | stop | amount | min_ratio | which | peak_distance |
---|---|---|---|---|---|---|
prt1 | 140 | 150 | 2 | 0.2 | FIRST | 5 |
name,start,stop,amount,min_ratio,which,peak_distance
prt1,135,155,2,0.2,FIRST,
prt3,190,205,,0.2,FIRST,
prt2,222,236,2,0.2,FIRST,5
prt4,262,290,5,,,
name
: Name of the assaystart
: Start of the assay in basepairsstop
: Stop of the assay in basepairsamount
: Optional. Amount of peaks in assay. If left empty every peak in the interval is included.min_ratio
: Optional. Only peaks with the a ratio of themin_ratio
of the highest peak is included, e.g. ifmin_ratio == .02
, only peaks with a height of 20 is included, if the highest peak is 100 unitswhich
: LARGEST | FIRST. Can be left empty. Which peak should be included if there are more peaks than theamount
. if FIRST is set, then the two first peaks are chosen. If LARGEST are set, then the two largests peaks in the area are chosen. Defaults to LARGESTpeak_distance
: Optional. Distance between peaks must be under this value.
The following positional arguments are required:
IN_PATH
: Typestr
. Specifies the input path.OUT_FOLDER
: Typestr
. Specifies the output folder.LADDER
: Typestr
. Specifies the ladder used in the experiment.
The following flags can be used with the fraggler peak
or fraggler area
command:
-l, --ladder=LADDER
: Typestr
. Specifies the ladder. Default value: 'LIZ'.--peak_model=PEAK_MODEL
: Typestr
. Specifies the peak model. Default value: 'gauss'.--min_ratio=MIN_RATIO
: Typefloat
. Specifies the minimum ratio. Default value: 0.3.--min_height=MIN_HEIGHT
: Typeint
. Specifies the minimum height. Default value: 100.--cutoff=CUTOFF
: Typeint
. Specifies the cutoff value. Default value: 175.-t, --trace_channel=TRACE_CHANNEL
: Typestr
. Specifies the trace channel. Default value: 'DATA9'.--peak_height=PEAK_HEIGHT
: Typeint
. Specifies the peak height. Default value: 200.--custom_peaks=CUSTOM_PEAKS
: TypeOptional[str]
. Specifies custom peaks. Default value: None.-e, --excel=EXCEL
: Type:bool
, Default: True
fraggler area IN_FOLDER OUT_FOLDER LIZ --min_ratio=0.2
Click here to get full documentation of API.
One example of the report generated from fraggler area
can be seen here:
Please check out How to contribute