### Navigation

- index
- modules |
- SamSifter 0.3.1 documentation »

# samsifter.filters package

## Submodules

## samsifter.filters.bam_2_sam module

Wrapper for SAMtools view.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.calculate_pmds module

Wrapper for PMDtools score calculation.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.compress module

Wrapper for GNU Gzip compression functionality.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.count_taxon_reads module

Analysing filter step to measure read counts per taxon.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.decompress module

Wrapper for GNU Gzip decompression functionality.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.filter_read_conservation module

Identify highly conserved reads in a SAM file.

Filters reads assigned to multiple taxa with similar identity. Excludes reads mapping to different accessions/taxa with similar alignment scores.

`item`()

  Create FilterItem for this filter to be used in list and tree models.

  Returns: | Object representing this filter in item-based models.
  Return type: | FilterItem

`main`()

  Executable to filter SAM files for reads with high conservation.

  See `--help` for details on expected arguments. Takes input from either STDIN, or optional, or positional arguments. Logs messages to STDERR and writes processed SAM files to STDOUT.

## samsifter.filters.filter_read_identity module

Wrapper for PMDtools identity filter functionality.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.filter_read_list module

Created on Thu Dec 18 09:34:28 2014

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.filter_read_pmds module

Created on Thu Dec 18 09:34:28 2014

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.filter_ref_coverage module

Identify reference accessions with uneven coverage in MALT’ed SAM files.

`calc_avg_depth`(depth_dist, ignore_uncovered=True)

  Calculate average depth from a coverage distribution.

  Optionally ignores uncovered bases (first array element).

`covered_length_from_cigar`(cigar)

  Calculate length of reference covered by read from CIGAR operations.

  - not counting padding, skipping or insertions into the reference
  - not counting hard or soft clipped bases of the read

`get_gini_auc`(x, y)

  Calculate Gini coefficient and area under Lorenz curve.

  Expects arrays of x and y coordinates for a normalized Lorenz distribution.

`integral_discrete`(dist, limit)

  Integrate discrete distribution with stepsize 1 by simply adding up values.

`integral_scaled`(dist, limit)

  Integrate scaled discrete distribution with arbitrary stepsize.

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`lorenzify`(depth_dist)

  Calculate Lorenz curve from coverage distribution.

`lorenzify_b2b`(depth_dist, ignore_uncovered=True)

  Calculate Lorenz curve from base2base coverage distribution.

`main`()

`plot_ccd`(ax, depth_dist_cumsum, avg_depth)

  Create a bar plot of a cumulative coverage distribution.

`plot_cd`(ax, depth_dist, avg_depth)

  Create a bar plot of a cumulative coverage distribution.

`plot_lorenz`(ax, x, y)

  Create a Lorenz curve plot of a coverage distribution.

`plot_lorenz_b2b`(ax, x, y)

  Create a Lorenz curve plot of a coverage distribution.

`plot_nccd`(ax, depth_dist_cumperc, avg_depth, max_depth, avg_depth_scaled, lci, color)

  Create a bar plot of a normalized cumulative coverage distribution.

  Includes legend stating average scaled and total depth

`plot_rld`(ax, length_dist, min_length, max_length, read_count, length_dist_total)

  Create a bar plot of a read length distribution.

  Includes scaled expected distribution based on all reads in file.

`plot_sccd`(ax, depth_dist_cumperc, avg_depth)

  Create a bar plot of a scaled cumulative coverage distribution.

`plot_scd`(ax, depth_dist, avg_depth, ref_length, max_depth)

  Create a bar plot of a scaled cumulative coverage distribution.

## samsifter.filters.filter_ref_identity module

Filters reference accessions with too few/many reads of high/low percent identity in MALT’ed SAM files”

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.filter_ref_list module

Created on Thu Dec 18 09:34:28 2014

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.filter_ref_pmds module

Filter references with high attribution of ancient reads in a MALT’ed and PMD’ed SAM file

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.filter_taxon_list module

Created on Thu Dec 18 09:34:28 2014

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.filter_taxon_pmds module

Filter taxa with high attribution of ancient reads in a MALT’ed and PMD’ed SAM file

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

`main`()

## samsifter.filters.filter_test module

Created on Fri Jan 16 11:55:23 2015

@author: aldehoff

`main`()

## samsifter.filters.remove_duplicates module

Wrapper for SAMtools rmdup

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.sam_2_bam module

Wrapper for SAMtools view

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.sort_by_coordinates module

Wrapper for SAMtools sort

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## samsifter.filters.sort_by_names module

Wrapper for SAMtools sort

`item`()

  Create item representing this tool in list and tree views.

  Returns: | Item for use in item-based list and tree views.
  Return type: | FilterItem

## Module contents

### Navigation

- index
- modules |
- SamSifter 0.3.1 documentation »