Esempio n. 1
0
"""
import numpy as np
import domainogram_diag2
import directional_indice
import scn
import ice_mirny3
import comp_short
from pylab import *
import gc_content
import matplotlib.gridspec as gridspec

BIN = 5000
data1 = loadtxt(sys.argv[1])

matscn1 = ice_mirny3.ice_func(data1, 100)
matscn1 = scn.scn_func(matscn1, 0)

#matscn1=data1;
name = sys.argv[2]

#  PLOTTING MATRIX AND MULTI-SCALES DOMAINOGRAM:
M = np.corrcoef(matscn1)
#M = matscn1;
n1 = M.shape[0]
# Choice of scales:
#v=10**(np.array(range(50,161)) *0.04) / BIN
#v=v.astype(int);
#v2=sorted(set(v));
#scales=v2;
scales = range(0, 100)
#---------------------------------------------------------------------------------
Esempio n. 2
0
)
MATRICE2 = loadtxt(
    "/home/axel/Bureau/data/vick/2014_05_HiSeq_Boccard/matrices_Vicky/ecoli_MM_deltaMatP/BC172_CGGT_fused7banks_ecoli_MM_deltaMatP/matrices_DeltaMatP/matrices_2kb/mat_temp.dat"
)

# Next seq data:
MATRICE1 = loadtxt(
    "/run/media/axel/9e657c5d-6ac3-494e-81af-b25e389d59bd/vick_data_backup/exp5_dec2014_NextSeq/fastq/BC70_TACT_WT/matrices_BC70_TACT_WT/mat_temp.dat"
)
MATRICE2 = loadtxt(
    "/run/media/axel/9e657c5d-6ac3-494e-81af-b25e389d59bd/vick_data_backup/exp5_dec2014_NextSeq/fastq/BC72_AGCT_MatP/matrices_BC72_AGCT_MatP/mat_temp.dat"
)

# Normalisations:
matscn1 = ice_mirny3.ice_func(MATRICE1, 100)
matscn1 = scn.scn_func(matscn1, 0)

matscn2 = ice_mirny3.ice_func(MATRICE2, 0)
matscn2 = scn.scn_func(matscn2, 0)

# Plots:
imshow(matscn1**0.2,
       interpolation="none",
       cmap=cm,
       vmin=0.0,
       vmax=matscn1.max()**0.2)
colorbar()
plot(mats / BIN, mats / BIN, "o", color="orange")

# Ratio:
r = matscn2 / matscn1
Esempio n. 3
0
import distance_law
from scipy.stats.stats import pearsonr
import triangular_diag
import domainogram_diag2
import directional_indice
import gc_content
import scipy.ndimage
import scipy.io as sio
import sys

MAT_BIN = loadtxt(sys.argv[1])
name = sys.argv[2]

# Normalisation:

matscn1 = scn.scn_func(MAT_BIN, 0)
name = sys.argv[2]

#  PLOTTING MATRIX:
matplotlib.rcParams.update({'font.size': 8})
subplots_adjust(hspace=0.5)
plt.figure(num=None, figsize=(8, 9), dpi=80, facecolor='w', edgecolor='k')
#gs = gridspec.GridSpec(1, 1,);

#ax0 = plt.subplot(gs[0]);
C2 = sio.loadmat(
    '/home/axel/Bureau/bacteries_project/z-python_scripts/MyColormaps2.mat')
C = C2['mycmap2']
cm = mpl.colors.ListedColormap(C)

exponent = 0.2
Esempio n. 4
0
import matplotlib.pyplot as plt
from matplotlib.legend_handler import HandlerLine2D

from scipy.integrate import simps, trapz
import statsmodels.api as sm
lowess = sm.nonparametric.lowess
from scipy.stats.stats import pearsonr
from scipy.stats.stats import spearmanr

import scn

#---------------------------------------------------------------------------------
data1 = loadtxt(
    "/home/axel/Bureau/data/vick/2014_05_HiSeq_Boccard/matrices_Vicky/ecoli_MM_async/BC164_GTGT_fused7banks_Ecoli_MM_async/matrices_10kb/mat_temp.dat"
)
matscn1 = scn.scn_func(data1, 0)

length_genome = 4639675
bin_mat = 10000

bins = [
    1055417, 3250851, 331520, 3841019, 4024867, 806540, 1379810, 2383627,
    2470410
]

i = 0
for x_position in bins:
    i = i + 1
    print x_position

    file = "/run/media/axel/9e657c5d-6ac3-494e-81af-b25e389d59bd1/ECOLI_PROJECT/CMP_3C_Recombination/boccard_DATA/" + str(