<commit_before>Mutation Annotation Format (MAF) - Legacy TCGA Specification
==============================================
*This definition was taken from the previously public wiki hosted by TCGA and reflects the MAF format
that was available during the active period of the TCGA project.*



**Document Information**

The spec has been reverted to the June 26th version (version 20). Additional
changes are the removal of the "under construction" banner, changing all text to
black, and fixing a typo in the link to the MAF 2.2 specification.

**Specification for Mutation Annotation Format**  
Version 2.4.1  
June 20, 2014

**Contents**

-   1 Current version changes

-   2 About MAF specifications

    -   2.1 Definition of open access MAF
        data

    -   2.2 Somatic MAF vs. Protected
        MAF

-   3 MAF file fields

    -   3.1 Table 1 - File column
        headers

-   4 MAF file checks

-   5 MAF naming convention

-   6 Previous specification
    versions

Current version changes
=======================

This current revision is **version 2.4.1** of the Mutation Annotation Format
(MAF) specification.

The following items in the specification were added or modified in version 2.4.1
from version 2.4:

-   Header for MAF file is "\#version 2.4.1"

-   "Somatic" and "None" are the only acceptable values for "Mutation_Status"
    for a somatic.MAF (named .somatic.maf). When Mutation_Status is None,
    Validation_Status must be Invalid.

-   Centers need to make sure that Mutations_Status "None" doesn't include
    germline mutation.

-   For a somatic MAF, following rules should be satisfied:  
    SOMATIC = (A AND (B OR C OR D)) OR (E AND F)  
    A: *Mutation_Status* == "Somatic"  
    B: *Validation_Status* == "Valid"  
    C. *Verification_Status* == "Verified"  
    D. *Variant_Classification* is not {Intron, 5'UTR, 3'UTR, 5'Flank, 3'Flank,
    IGR}, which implies that *Variant_Classification* can only be
    \\{Frame_Shift_Del, Frame_Shift_Ins, In_Frame_Del, In_Frame_Ins,
    Missense_Mutation, Nonsense_Mutation, Silent, Splice_Site,
    Translation_Start_Site, Nonstop_Mutation, RNA, Targeted_Region}.  
    E: *Mutations_status == "None"*  
    F: *Validation_status == "Invalid"*

-   Extra validation rules: If Validation_Status == Valid or Invalid, then
    Validation_Method != none (case insensitive).

About MAF specifications
========================

Mutation annotation files should be transferred to the DCC. Those files should
be formatted using the mutation annotation format (MAF) that is described below.
File naming convention is also
[below](#MutationAnnotationFormat(MAF)Specificat).

Following categories of somatic mutations are reported in MAF files:

-   Missense and nonsense

-   Splice site, defined as SNP within 2 bp of the splice junction

-   Silent mutations

-   Indels that overlap the coding region or splice site of a gene or the
    targeted region of a genetic element of interest.

-   Frameshift mutations

-   Mutations in regulatory regions

### Definition of open access MAF data

A large proportion of MAFs are submitted as discovery data and sites labeled as
somatic in these files overlap with known germline variants. In order to
minimize germline contamination in putative (unvalidated) somatic calls, certain
filtering criteria have been imposed. Based on current policy, open access MAF
data should:

-   **include**  all validated somatic mutation calls

-  **include** all unvalidated somatic mutation calls that overlap with a coding region or splice site

-   **exclude**  all other types of mutation calls (i.e., non-somatic calls (validated or not), unvalidated somatic calls that are not in coding region or splice sites, and dbSNP sites that are not annotated as somatic in dbSNP,COSMIC or OMIM

 

### Somatic MAF vs. Protected MAF

Centers will submit to the DCC MAF archives that contain Somatic MAF
(named **.somatic.maf**) for open access data and an all-inclusive Protected MAF
(named **.protected.maf**) that does not filter any data out and represents the
original super-set of mutation calls. The files will be formatted using the
Mutation Annotation Format (MAF).

The following table lists some of the critical attributes of somatic and
protected MAF files and provides a comparison.

| Attribute       | Somatic MAF | Protected MAF |
| -----------     | ----------- | ------------- |<commit_msg>more error fixes<commit_after>Mutation Annotation Format (MAF) - Legacy TCGA Specification
==============================================
*This definition was taken from the previously public wiki hosted by TCGA and reflects the MAF format
that was available during the active period of the TCGA project.*



**Document Information**

The spec has been reverted to the June 26th version (version 20). Additional
changes are the removal of the "under construction" banner, changing all text to
black, and fixing a typo in the link to the MAF 2.2 specification.

**Specification for Mutation Annotation Format**  
Version 2.4.1  
June 20, 2014

**Contents**

-   1 Current version changes

-   2 About MAF specifications

    -   2.1 Definition of open access MAF
        data

    -   2.2 Somatic MAF vs. Protected
        MAF

-   3 MAF file fields

    -   3.1 Table 1 - File column
        headers

-   4 MAF file checks

-   5 MAF naming convention

-   6 Previous specification
    versions

Current version changes
=======================

This current revision is **version 2.4.1** of the Mutation Annotation Format
(MAF) specification.

The following items in the specification were added or modified in version 2.4.1
from version 2.4:

-   Header for MAF file is "\#version 2.4.1"

-   "Somatic" and "None" are the only acceptable values for "Mutation_Status"
    for a somatic.MAF (named .somatic.maf). When Mutation_Status is None,
    Validation_Status must be Invalid.

-   Centers need to make sure that Mutations_Status "None" doesn't include
    germline mutation.

-   For a somatic MAF, following rules should be satisfied:  
    SOMATIC = (A AND (B OR C OR D)) OR (E AND F)  
    A: *Mutation_Status* == "Somatic"  
    B: *Validation_Status* == "Valid"  
    C. *Verification_Status* == "Verified"  
    D. *Variant_Classification* is not {Intron, 5'UTR, 3'UTR, 5'Flank, 3'Flank,
    IGR}, which implies that *Variant_Classification* can only be
    \\{Frame_Shift_Del, Frame_Shift_Ins, In_Frame_Del, In_Frame_Ins,
    Missense_Mutation, Nonsense_Mutation, Silent, Splice_Site,
    Translation_Start_Site, Nonstop_Mutation, RNA, Targeted_Region}.  
    E: *Mutations_status == "None"*  
    F: *Validation_status == "Invalid"*

-   Extra validation rules: If Validation_Status == Valid or Invalid, then
    Validation_Method != none (case insensitive).

About MAF specifications
========================

Mutation annotation files should be transferred to the DCC. Those files should
be formatted using the mutation annotation format (MAF) that is described below.
File naming convention is also
[below](#MutationAnnotationFormat(MAF)Specificat).

Following categories of somatic mutations are reported in MAF files:

-   Missense and nonsense

-   Splice site, defined as SNP within 2 bp of the splice junction

-   Silent mutations

-   Indels that overlap the coding region or splice site of a gene or the
    targeted region of a genetic element of interest.

-   Frameshift mutations

-   Mutations in regulatory regions

### Definition of open access MAF data

A large proportion of MAFs are submitted as discovery data and sites labeled as
somatic in these files overlap with known germline variants. In order to
minimize germline contamination in putative (unvalidated) somatic calls, certain
filtering criteria have been imposed. Based on current policy, open access MAF
data should:

-   **include**  all validated somatic mutation calls

-  **include** all unvalidated somatic mutation calls that overlap with a coding region or splice site

-  **exclude** all other types of mutation calls (i.e. non-somatic calls (validated or not), unvalidated somatic call that are not in coding region or splice sites, and dbSNP sites that are not annotated as somatic in dbSNP, COMIC, or OMIM)

### Somatic MAF vs. Protected MAF

Centers will submit to the DCC MAF archives that contain Somatic MAF
(named **.somatic.maf**) for open access data and an all-inclusive Protected MAF
(named **.protected.maf**) that does not filter any data out and represents the
original super-set of mutation calls. The files will be formatted using the
Mutation Annotation Format (MAF).

The following table lists some of the critical attributes of somatic and
protected MAF files and provides a comparison.

| Attribute       | Somatic MAF | Protected MAF |
| -----------     | ----------- | ------------- |
{'fraction_non_alphanumeric': 0.08943550215370664, 'fraction_numerical': 0.00997506234413965, 'mean_word_length': 3.6707252514557966, 'pattern_counts': {'":': 0, '<': 3, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '529020', 'n_tokens_mistral': 2586, 'n_tokens_neox': 2366, 'n_words': 1131}