<commit_before>======================
Working with VCF files
======================

Somatic Variant Calling
=======================

VarScan
^^^^^^^

A command line like this works well to generate a VCF file that contains
putative somatic mutations:

.. code-block:: bash

   java64 Xmx4g -jar VarScan.jar somatic \
      <( samtools mpileup -C50 -BQ0 -d 1000000 -A -f FASTAFILE NORMALBAM ) \
      <( samtools mpileup -C50 -d 1000000 -A -f FASTAFILE TUMORBAM ) \
      PREFIX --output-vcf -min-var-freq 0.05

The `FASTAFILE`, `NORMALBAM`, and `TUMORBAM` should be self-explanatory.  The
`PREFIX` should be replaced with the prefix for the .snp and .indel files 
from VarScan.  The `min-var-freq` setting turns up the sensitivity for 
somatic variants; these may need to be filtered out later. 
    


Annotating VCF Files
====================

snpEff
------

Download data
^^^^^^^^^^^^^

.. code-block:: bash 

    java -jar /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.jar download -c /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.config GRCh37.66

Run effect prediction
^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash 

    java -jar /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.jar eff -c /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.config GRCh37.66


snpSift
-------

Annotate with dbSNP
^^^^^^^^^^^^^^^^^^^

.. code-block:: bash
 <commit_msg>Added a few lines to docs regarding VCF processing<commit_after>======================
Working with VCF files
======================

Somatic Variant Calling
=======================

VarScan
-------

A command line like this works well to generate a VCF file that contains
putative somatic mutations:

.. code-block:: bash

   java64 Xmx4g -jar VarScan.jar somatic \
      <( samtools mpileup -C50 -BQ0 -d 1000000 -A -f FASTAFILE NORMALBAM ) \
      <( samtools mpileup -C50 -d 1000000 -A -f FASTAFILE TUMORBAM ) \
      PREFIX --output-vcf -min-var-freq 0.05

The `FASTAFILE`, `NORMALBAM`, and `TUMORBAM` should be self-explanatory.  The
`PREFIX` should be replaced with the prefix for the .snp and .indel files 
from VarScan.  The `min-var-freq` setting turns up the sensitivity for 
somatic variants; these may need to be filtered out later. 
    

After generating the VarScan VCF files, they need to be "fixed" using `seqtools varscan fixVcf` command-line script.  


Annotating VCF Files
====================
A few command-lines for annotating VCF files using snpEff and snpSift are given below.  In addition, one should run the GATK VariantAnnotator script to generate rich quality control information for the VCF files.  


snpEff
------

Download data
^^^^^^^^^^^^^

.. code-block:: bash 

    java -jar /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.jar download -c /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.config GRCh37.66

Run effect prediction
^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash 

    java -jar /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.jar eff -c /data/CCRBioinfo/biowulf/local/snpEff_3_0/snpEff.config GRCh37.66


snpSift
-------

Annotate with dbSNP
^^^^^^^^^^^^^^^^^^^

.. code-block:: bash
 
{'fraction_non_alphanumeric': 0.17533096545043592, 'fraction_numerical': 0.026477236034872457, 'mean_word_length': 3.5693215339233038, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4061607', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1057, 'n_words': 320}