Skip to content

Commit

Permalink
Add N7-G data channel compatibility
Browse files Browse the repository at this point in the history
Added --concat flag allowing Ringmapper to concatenate and process
N1/3 and N7-G modifications simultaneously and generate N1/3-N1/3,
N13-N7G, and N7G-N7G RINGs.

Additionally, added a new statistic allowing for determination of
effect size of a given RING.
  • Loading branch information
lucaskearns committed Nov 23, 2024
1 parent ced0259 commit 9cd5693
Show file tree
Hide file tree
Showing 7 changed files with 331 additions and 60 deletions.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RingMapper v1.2
# RingMapper v1.3

Code for performing RING-MaP and PAIR-MaP analysis
(RingMapper & PairMapper)
Expand Down Expand Up @@ -31,6 +31,11 @@ by ShapeMapper2 using the --output-parsed flag.
See the ShapeMapper2 documentation for further information regarding
alignment and processing options.

Following the release of ShapeMapper2.3 RingMapper may now be used to compute
N1/3-N7 and N7-N7 RINGs in addition to traditional N1/3-N1/3 RINGs. See the
section titled "RingMapper Usage for N7" below. Note - PairMapper not currently
tested for compatibility with N7 functionality.

RING and PAIR-MaP data can be visualized using the arcPlot plotting tool,
available at https://github.com/Weeks-UNC/arcPlot

Expand Down Expand Up @@ -104,6 +109,41 @@ Ringfile List of correlations. See docs/ringfile-format.txt

--------------------------------------------------------------------------

RingMapper Usage for N7
-----------------
```
ringmapper.py <optional args> --parsedMutga parsed.mutga --fasta fasta.fa inputfile outputfile | --help
```

### Required inputs
```
inputfile Parsed mutation file of modified sample
--parsedMutga Parsed mutation file of modified sample containing N7 modifications
--fasta Path to fasta sequence file
outputpath Path where output Ringfiles will be written
```

### Optional arguments
```
--untreatedMutga Path to mutation file for untreated sample containing N7 modifications.
Nts with high mutation rates or correlations in the untreated sample
are ignored (Required --untreated)
--keepconcat Keep the concatenated mutation string files for use in other analyses
A full list of optional arguments/parameters can be accessed by running with --help flag
```

### Outputs
```
Ringfile_concatrings List of N1/3-N1/3, N1/3-N7, and N7-N7 correlations. See docs/ringfile-format.txt
Ringfile_N1 List of N1/3-N1/3 correlations. See docs/ringfile-format.txt
Ringfile_N1N7 List of N1/3-N7 correlations. See docs/ringfile-format.txt
Ringfile_N7 List of N7-N7 correlations. See docs/ringfile-format.txt
```

--------------------------------------------------------------------------

PairMapper Usage
-----------------
```
Expand Down
23 changes: 21 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
Version 1.3
August 30, 2024
Thomas Miller <[email protected]>, Lucas Kearns <[email protected]>,
David Mitchell <[email protected]>
***********************************************************************

ADDED:

Added ShapeMapper_MMS0_Mut_Filter.py. Filters SM runs performed with min mut
separation set to 0. Enables optimal base pair detection by PairMapper. See README for details.

Added --concat flag. This flag allows RingMapper to concatenate N1/3 and N7-G mut files and
generate N1/3-N1/3, N1/3-N7G, and N7G-N7G RINGs.

Added alpha statistic calculation. Equivalent to
(comutations / Depth) /
((i mutations and no j mutations / Depth) * (j mutations and no i mutations / Depth))
(See 2024 N7 publication for a more in depth explanation / cleaner
formula). Allows for determination of effect size of a given RING.


Version 1.2
August 25, 2022
Anthony Mustoe <[email protected]>
Expand Down Expand Up @@ -80,5 +101,3 @@ than matrix format
write pairmapper files despite failure of one on more quality checks

-added significantDifference function for computing differences between contigency tables


5 changes: 5 additions & 0 deletions docs/ringfile-format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Mod_Depth Number of times windows i,j were read together in the Modified sampl

Mod_Comuts Number of times windows i,j were mutated together in the Modified sample

Alpha Statistic quantifying the coupling strength between nucleotides. Equivalent
to pij / (pi*pj) where pij is the joint probability of both nucleotides
i and j being mutated and pi and pj are the marginal mutation probabilities
of i and j.

Unt_Depth Number of times windows i,j were read together in the Untreated sample

Unt_Comuts Number of times windows i,j were mutated together in the Untreated sample
Expand Down
2 changes: 1 addition & 1 deletion pairmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def isComplement(seq1, seq2, maxGU, maxNC):
if isComplement(self.parent.sequence[i:i+self.parent.window],
self.parent.sequence[j:j+self.parent.window], maxGU=maxGU, maxNC=maxNC):
compcorrs.append((i,j))

print(compcorrs)
return compcorrs


Expand Down
3 changes: 2 additions & 1 deletion readMutStrings.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
from libc.stdio cimport FILE, fopen, fclose, getline
from libc.stdlib cimport atoi, free
from libc.string cimport strsep, strtok, strcmp, strdup

import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
import numpy as np
cimport numpy as np

Expand Down
Loading

0 comments on commit 9cd5693

Please sign in to comment.