Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Volume charactristic calculator #45

Open
ChainsManipulator opened this issue Oct 13, 2024 · 0 comments
Open

Add Volume charactristic calculator #45

ChainsManipulator opened this issue Oct 13, 2024 · 0 comments
Assignees

Comments

@ChainsManipulator
Copy link
Member

ChainsManipulator commented Oct 13, 2024

Add calculator function for volume characteristic for given intervals array using formula:
$$V=\displaystyle \prod_{j=1}^{m} \prod_{i=1}^{n_j} \Delta_{ij}$$
Where $\Delta_{ij}$ is an interval.

Examples

X = [2, 4, 2, 2, 4]
x_intervals = intervals(X, 'Start', 'Normal')
result = volume(x_intervals)
print(result)
> 12
X = ['B','B','A','A','C','B','A','C','C','B']
x_intervals = intervals(X, 'Start', 'Lossy')
result = volume(x_intervals)
print(result)
> 144
X = ['B','B','A','A','C','B','A','C','C','B']
x_intervals = intervals(X, 'Start', 'Normal')
result = volume(x_intervals)
print(result)
> 2160
X = ['B','B','A','A','C','B','A','C','C','B']
x_intervals = intervals(X, 'End', 'Normal')
result = volume(x_intervals)
print(result)
> 1152
X = ['B','B','A','A','C','B','A','C','C','B']
x_intervals = intervals(X, 'End', 'Redundant')
result = volume(x_intervals)
print(result)
> 17280
X = ['B','B','A','A','C','B','A','C','C','B']
x_intervals = intervals(X, 'End', 'Cycle')
result = volume(x_intervals)
print(result)
> 5184

X = ['C','C','A','C','G','C','T','T','A','C']
x_intervals = intervals(X, 'Start', 'Lossy')
result = volume(x_intervals)
print(result)
> 96
X = ['C','C','A','C','G','C','T','T','A','C']
x_intervals = intervals(X, 'Start', 'Normal')
result = volume(x_intervals)
print(result)
> 10080
X = ['C','C','A','C','G','C','T','T','A','C']
x_intervals = intervals(X, 'End', 'Normal')
result = volume(x_intervals)
print(result)
> 3456
X = ['C','C','A','C','G','C','T','T','A','C']
x_intervals = intervals(X, 'End', 'Redundant')
result = volume(x_intervals)
print(result)
> 362880
X = ['C','C','A','C','G','C','T','T','A','C']
x_intervals = intervals(X, 'End', 'Cycle')
result = volume(x_intervals)
print(result)
> 34560

X = ['C','C','C','C'] 
x_intervals = intervals(X, 'Start', 'Lossy')
result = volume(x_intervals)
print(result)
> 1
X =['C','C','C','C']  
x_intervals = intervals(X, 'Start', 'Normal')
result = volume(x_intervals)
print(result)
> 1
X = ['C','C','C','C'] 
x_intervals = intervals(X, 'End', 'Normal')
result = volume(x_intervals)
print(result)
> 1
X = ['C','C','C','C'] 
x_intervals = intervals(X, 'End', 'Redundant')
result = volume(x_intervals)
print(result)
> 1
X = ['C','C','C','C'] 
x_intervals = intervals(X, 'End', 'Cycle')
result = volume(x_intervals)
print(result)
> 1

No intervals

X = ['C','G'] 
x_intervals = intervals(X, 'End', 'Lossy')
result = volume(x_intervals)
print(result)
> 1
X = ['A','C','G','T'] 
x_intervals = intervals(X, 'End', 'Lossy')
result = volume(x_intervals)
print(result)
> 1
X = [2, 1] 
x_intervals = intervals(X, 'End', 'Lossy')
result = volume(x_intervals)
print(result)
> 1
@ChainsManipulator ChainsManipulator converted this from a draft issue Oct 13, 2024
@ChainsManipulator ChainsManipulator changed the title Add integreal numeric charactristics calculators Add volume charactristic calculator Oct 14, 2024
@ChainsManipulator ChainsManipulator changed the title Add volume charactristic calculator Add Volume charactristic calculator Oct 14, 2024
@ChainsManipulator ChainsManipulator moved this from In Progress to Pending review in FOApy V1 - Batman begins Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending review
Development

No branches or pull requests

2 participants