Skip to content

Commit

Permalink
IH 25DEC2023 pulled in upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
ijhoskins committed Dec 25, 2023
2 parents 0847607 + aa7eeb7 commit c3e5c50
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ Release Summary:
Ensure HGVS annotations use uppercase bases to ensure compatibility with MAVEdb.

Fixed run_mave_hgvs_annot.py script to require target BED and fix bug in deletion-insertion MAVE-HGVS string.

1.1.4-dev, December 25, 2023
Fixed bug in HGVS annotations for out-of-frame duplications > 1 nt.

11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The 'sim' workflow outputs paired FASTQs, a realigned BAM file, and a truth VCF

### Run 'call'

Support exists for calling SNPs/SNVs, MNPs/MNVs, insertions, and deletions. Complex InDels are not supported (e.g. delete a codon, insert a nt).
Support exists for calling SNPs/SNVs, MNPs/MNVs, insertions, and deletions. Multi-codon changes and complex InDels are not supported (e.g. delete a codon, insert a nt).

Run 'call' on the simulated data by specifying an Ensembl transcript/gene ID and the directory containing curated reference files.
```
Expand Down Expand Up @@ -112,6 +112,15 @@ To run unit tests, execute the following from the satmut\_utils repository:

```nose2 -q```

## Accessory scripts

Two command-line interfaces are provided to enable pre-processing of reads prior to satmut_utils 'sim':

1. satmut\_trim
2. satmut\_align

satmut\_trim is a wrapper around cutadapt, and satmut\_align a wrapper around bowtie2. satmut\_align should be used to generate the BAM file accepted by 'sim'. If reads have been aligned with some other method, there is no guarantee 'sim' will complete without error, as alignment tags output by bowtie2 are required for 'sim' (MD, NM).

## Citation

If you use satmut\_utils, please cite the following paper:
Expand Down
2 changes: 1 addition & 1 deletion docs/satmut_utils_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ It is recommended that a new output directory is created for each job. Default i
```OUTPUT_DIR="/tmp/satmut_utils_test"```

Additionally, the user can set a directory for temporary files by setting an environment variable $SCRATCH. If this variable is not set, temporary files are written to /tmp.
```export SCRATCH="/tmp/satmut_temp"```
```export SCRATCH="$(mktemp -d -t satmut_temp)"```

### 'sim' code examples

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = satmut_utils
version = 1.1.3-dev
version = 1.1.4-dev
author = Ian Hoskins
author_email = [email protected]
description = Tools for variant simulation and variant calling in paired end, targeted sequencing saturation mutagenesis experiments
Expand Down
6 changes: 2 additions & 4 deletions src/analysis/coordinate_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ class MapperBase(object):
J_GENE_SEG_ID = "J_gene_segment"
C_GENE_SEG_ID = "C_gene_segment"

# Omit transcripts on non-NC contigs
CONTIGS_TO_OMIT = re.compile("|".join(["NT", "NW"]))

FEATURES_TO_OMIT = [R_RNA_ID, T_RNA_ID, MI_RNA_ID, SN_RNA_ID, SNO_RNA_ID, NC_RNA_ID, LNC_RNA_ID, TELO_RNA_ID,
DLOOP_ID, VAULT_RNA_ID, ANTIS_RNA_ID, Y_RNA, RNASE_MRP_RNA_ID, RNASE_P_RNA_ID, SRP_RNA_ID,
PROMOTER_ID, ENHANCER_ID, REPEAT_ID, REGION_ID, SEQ_FEAT_ID, MATCH_ID, CDNA_MATCH_ID,
Expand Down Expand Up @@ -640,6 +637,7 @@ def _annotate_snp_hgvs(self, trx_id, location, pos, ref, alt, cds_start_offset,
elif location == self.CDS_ID:
hgvs_nt = "%s:c.%i%s>%s" % (trx_id, start_index + 1, ref, alt)
hgvs_tx = "%s:r.%i%s>%s" % (trx_id, start_index + 1, su.dna_to_rna(ref), su.dna_to_rna(alt))

if ref_aa == alt_aa:
hgvs_pro = "p.%s%i=" % (AA_MAP[ref_aa], aa_pos)
else:
Expand Down Expand Up @@ -997,7 +995,7 @@ def _annotate_dup_hgvs(self, trx_id, location, pos, alt_len, cds_start_offset, c
else:
# Frameshift dup
ref_aa, aa_pos = self._get_fs_first_alt_aa(alt_aas, cds_stop_offset, start_index, ref_codon_dict)
hgvs_pro = "p.%s%ifs" % (AA_MAP[translate(ref_aa)], aa_pos)
hgvs_pro = "p.%s%ifs" % (AA_MAP[ref_aa], aa_pos)
else:
raise NotImplementedError

Expand Down
2 changes: 1 addition & 1 deletion src/satmut_utils/satmut_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__author__ = "Ian Hoskins"
__credits__ = ["Ian Hoskins"]
__license__ = "GPLv3"
__version__ = "1.1.3-dev"
__version__ = "1.1.4-dev"
__maintainer__ = "Ian Hoskins"
__email__ = "[email protected]"
__status__ = "Development"
Expand Down

0 comments on commit c3e5c50

Please sign in to comment.