Skip to content

Commit

Permalink
Merge pull request #25 from sbslee/0.14.0-dev
Browse files Browse the repository at this point in the history
0.14.0 dev
  • Loading branch information
sbslee authored Jun 20, 2021
2 parents 9249c80 + abe184a commit d502903
Show file tree
Hide file tree
Showing 12 changed files with 662 additions and 399 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
*********

0.14.0 (2021-06-20)
-------------------

* :issue:`23`: Deprecate methods :meth:`pyvcf.VcfFrame.markmiss_ad/af/dp` and add new method :meth:`pyvcf.VcfFrame.markmiss`.
* Add new command :command:`vcf_filter`.
* Update methods :meth:`pycov.CovFrame.slice/plot_region`.
* :issue:`24`: Add new method :meth:`pyvcf.VcfFrame.drop_duplicates`.
* Update :meth:`pymaf.MafFrame.plot_snvcls` method to support various plotting modes.
* Rename ``horizontal`` argument of :meth:`pymaf.MafFrame.plot_varsum` method to ``flip``.

0.13.0 (2021-06-16)
-------------------

Expand Down
28 changes: 10 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ For getting help on the fuc CLI:
maf_vcf2maf [MAF] convert an annotated VCF file to a MAF file
tbl_merge [TABLE] merge two table files
tbl_sum [TABLE] summarize a table file
vcf_filter [VCF] filter a VCF file
vcf_merge [VCF] merge two or more VCF files
vcf_rename [VCF] rename the samples in a VCF file.
vcf_slice [VCF] slice a VCF file
Expand Down Expand Up @@ -164,8 +165,7 @@ For getting help on a specific submodule (e.g. pyvcf):
CLI Examples
============

BAM
---
**BAM**

To print the header of a SAM file:

Expand All @@ -185,26 +185,23 @@ To slice a BAM file:
$ fuc bam_slice in.bam chr1:100-200 out.bam
BED
---
**BED**

To find intersection between BED files:

.. code-block:: text
$ fuc bed_intxn 1.bed 2.bed 3.bed > intersect.bed
FASTQ
-----
**FASTQ**

To count sequence reads in a FASTQ file:

.. code-block:: text
$ fuc fq_count example.fastq
FUC
---
**FUC**

To check whether a file exists in the operating system:

Expand All @@ -218,17 +215,15 @@ To find all VCF files within the current directory recursively:
$ fuc fuc_find .vcf.gz
TABLE
-----
**TABLE**

To merge two tab-delimited files:

.. code-block:: text
$ fuc tbl_merge left.tsv right.tsv > merged.tsv
VCF
---
**VCF**

To merge VCF files:

Expand All @@ -245,8 +240,7 @@ To filter a VCF file annotated by Ensemble VEP:
API Examples
============

BAM
---
**BAM**

To create read depth profile of a region from a CRAM file:

Expand All @@ -259,8 +253,7 @@ To create read depth profile of a region from a CRAM file:
.. image:: https://raw.githubusercontent.com/sbslee/fuc-data/main/images/coverage.png

VCF
---
**VCF**

To filter a VCF file based on a BED file:

Expand Down Expand Up @@ -315,8 +308,7 @@ To create various figures for normal-tumor analysis:
.. image:: https://raw.githubusercontent.com/sbslee/fuc-data/main/images/normal-tumor.png

MAF
---
**MAF**

To create an oncoplot with a MAF file:

Expand Down
38 changes: 38 additions & 0 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ For getting help on the fuc CLI:
maf_vcf2maf [MAF] convert an annotated VCF file to a MAF file
tbl_merge [TABLE] merge two table files
tbl_sum [TABLE] summarize a table file
vcf_filter [VCF] filter a VCF file
vcf_merge [VCF] merge two or more VCF files
vcf_rename [VCF] rename the samples in a VCF file.
vcf_slice [VCF] slice a VCF file
Expand Down Expand Up @@ -551,6 +552,43 @@ tbl_sum
columns to be summarized (by default, all columns will
be included)
vcf_filter
==========

.. code-block:: text
$ fuc vcf_filter -h
usage: fuc vcf_filter [-h] [--greedy] [--opposite] [--samples PATH]
[--filter_empty]
vcf expr
This command will filter a VCF file (both zipped and unzipped). It essentially
wraps the 'pyvcf.VcfFrame.markmiss' method from the fuc API.
usage examples:
$ fuc vcf_filter in.vcf 'GT == "0/0"' > out.vcf
$ fuc vcf_filter in.vcf 'GT != "0/0"' > out.vcf
$ fuc vcf_filter in.vcf 'DP < 30' > out.vcf
$ fuc vcf_filter in.vcf 'DP < 30' --greedy > out.vcf
$ fuc vcf_filter in.vcf 'AD[1] < 10' --greedy > out.vcf
$ fuc vcf_filter in.vcf 'AD[1] < 10 and DP < 30' --greedy > out.vcf
$ fuc vcf_filter in.vcf 'AD[1] < 10 or DP < 30' --greedy > out.vcf
$ fuc vcf_filter in.vcf 'AD[1] < 10 or DP < 30' --opposite > out.vcf
$ fuc vcf_filter in.vcf 'np.mean(AD) < 10' --greedy --samples sample.list > out.vcf
positional arguments:
vcf VCF file
expr expression to evaluate
optional arguments:
-h, --help show this help message and exit
--greedy use this flag to mark even ambiguous genotypes as missing
--opposite use this flag to mark all genotypes that do not satisfy the
query expression as missing and leave those that do intact
--samples PATH file of sample names to apply the marking (one sample per
line)
--filter_empty use this flag to remove rows with no genotype calls at all
vcf_merge
=========

Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.linkcode',
'sphinx.ext.autosectionlabel',
'sphinx_rtd_theme',
'sphinx_issues',
'autodocsumm',
Expand All @@ -51,6 +52,8 @@

napoleon_use_param = False

autosectionlabel_prefix_document = True

# Include the example source for plots in API docs
plot_include_source = True
plot_formats = [('png', 90)]
Expand Down
27 changes: 9 additions & 18 deletions docs/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@
CLI Examples
============
BAM
---
**BAM**
To print the header of a SAM file:
Expand All @@ -174,26 +173,23 @@
$ fuc bam_slice in.bam chr1:100-200 out.bam
BED
---
**BED**
To find intersection between BED files:
.. code-block:: text
$ fuc bed_intxn 1.bed 2.bed 3.bed > intersect.bed
FASTQ
-----
**FASTQ**
To count sequence reads in a FASTQ file:
.. code-block:: text
$ fuc fq_count example.fastq
FUC
---
**FUC**
To check whether a file exists in the operating system:
Expand All @@ -207,17 +203,15 @@
$ fuc fuc_find .vcf.gz
TABLE
-----
**TABLE**
To merge two tab-delimited files:
.. code-block:: text
$ fuc tbl_merge left.tsv right.tsv > merged.tsv
VCF
---
**VCF**
To merge VCF files:
Expand All @@ -234,8 +228,7 @@
API Examples
============
BAM
---
**BAM**
To create read depth profile of a region from a CRAM file:
Expand All @@ -248,8 +241,7 @@
.. image:: https://raw.githubusercontent.com/sbslee/fuc-data/main/images/coverage.png
VCF
---
**VCF**
To filter a VCF file based on a BED file:
Expand Down Expand Up @@ -304,8 +296,7 @@
.. image:: https://raw.githubusercontent.com/sbslee/fuc-data/main/images/normal-tumor.png
MAF
---
**MAF**
To create an oncoplot with a MAF file:
Expand Down
4 changes: 4 additions & 0 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Glossary
********

This section is currently empty.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Welcome to fuc's documentation!
:caption: Contents:

readme
glossary
cli
api
tutorials
Expand Down
Loading

0 comments on commit d502903

Please sign in to comment.