# Notebook from Prashant-mahajan/Seaborn-Tutorial-
Path: Seaborn Tutorial .ipynb

#Pandas for managing datasets
import pandas as pd _____no_output_____#Matplotlib for additional customization
from matplotlib import pyplot as plt
%matplotlib inline_____no_output_____#Seaborn for plotting and styling
import seaborn as sns _____no_output_____

Note: The argument  index_col=0 simply means we'll treat the first column of the dataset as the ID column_____no_output_____

#Read dataset
df = pd.read_csv('Pokemon.csv', index_col = 0)_____no_output_____df.head()_____no_output_____

# Seaborn's plotting functions _____no_output_____

# Recommended way
sns.lmplot(x='Attack', y='Defense', data=df)

# Alternative way
# sns.lmplot(x=df.Attack, y=df.Defense)_____no_output_____#Scatterplot arguments
sns.lmplot(x='Attack', y='Defense', data=df,
           fit_reg = False, #No regression line
           hue ='Stage') # Color by evolution stage _____no_output_____

# Customizing with Matplotlib_____no_output_____

#Plot using Seaborn
sns.lmplot(x='Attack', y='Defense', data=df,
           fit_reg = False,
           hue ='Stage')

#Tweak using Matplotlib
plt.ylim(0, None) # Giving axes limits
plt.xlim(0, None)_____no_output_____

# The role of Pandas_____no_output_____

# Boxplot
sns.boxplot(data=df)_____no_output_____# Pre-format DataFrame
stats_df = df.drop(['Total', 'Stage', 'Legendary'], axis = 1)

# New boxplot using stats_df
sns.boxplot(data=stats_df)_____no_output_____

# Seaborn Themes_____no_output_____

# Set theme
sns.set_style('whitegrid')

# Violin plot: They show the distribution (through the thickness of the violin) instead of only the summary statistics
sns.violinplot(x='Type 1', y='Attack', data=df)_____no_output_____

# Color palettes_____no_output_____

# Use Bulbapedia to create a new color palette
pkmn_type_colors = ['#78C850',  # Grass
                    '#F08030',  # Fire
                    '#6890F0',  # Water
                    '#A8B820',  # Bug
                    '#A8A878',  # Normal
                    '#A040A0',  # Poison
                    '#F8D030',  # Electric
                    '#E0C068',  # Ground
                    '#EE99AC',  # Fairy
                    '#C03028',  # Fighting
                    '#F85888',  # Psychic
                    '#B8A038',  # Rock
                    '#705898',  # Ghost
                    '#98D8D8',  # Ice
                    '#7038F8',  # Dragon
                   ]_____no_output_____# Violin plot with Pokemon color palette
sns.violinplot(x='Type 1', y='Attack', data=df, palette = pkmn_type_colors) #Set color palette_____no_output_____

# Swarm plot:

This visualization will show each point, while "stacking" those with similar values_____no_output_____

# Swarm plot with Pokemon color palette
sns.swarmplot(x='Type 1', y ='Attack', data=df, palette=pkmn_type_colors)_____no_output_____

# Overlaying swarm and violin plots
_____no_output_____

# Set figure size with matplotlib
plt.figure(figsize=(10,6))

# Create plot
sns.violinplot(x='Type 1',
               y='Attack',
               data=df,
               inner=None, # Remove the bars inside the violins
               palette=pkmn_type_colors)

sns.swarmplot(x='Type 1',
              y='Attack',
              data=df,
              color='k', # Make points black
              alpha=0.7) # and slightly transparent

# Set title with matplotlib
plt.title('Attack by Type')_____no_output_____

# Putting it all together _____no_output_____

stats_df.head()_____no_output_____# Melt DataFrame
melted_df = pd.melt(stats_df,
                    id_vars = ['Name', 'Type 1', 'Type 2'], #Variables to keep
                    var_name = 'Stat') # Name of melted variable
melted_df.head()_____no_output_____# Shape comparison
print(stats_df.shape)
print(melted_df.shape)(151, 9)
(906, 5)
# Swarmplot with melted_df
sns.swarmplot(x='Stat', y='value', data=melted_df, hue='Type 1')_____no_output_____

# Customisation _____no_output_____

# 1. Enlarge the plot
plt.figure(figsize=(10,6))

sns.swarmplot(x='Stat',
              y='value',
              data=melted_df,
              hue = 'Type 1',
              split = True, # 2. Separate points by hue
              palette=pkmn_type_colors) # 3. Use Pokemon palette

# 4. Place legend to the right
plt.legend(bbox_to_anchor=(1,1), loc=2)_____no_output_____

# Heatmap _____no_output_____

# Calcualte correlations
corr = stats_df.corr()

# Heatmap
sns.heatmap(corr)_____no_output_____

# Histogram _____no_output_____

# Distribution Plot
sns.distplot(df.Attack)_____no_output_____

# Bar Plot_____no_output_____

# Count Plot
sns.countplot(x='Type 1', data=df, palette=pkmn_type_colors)

# Rotate x-labels
#plt.xticks(rotations=-45)_____no_output_____

# Factor Plot _____no_output_____

# Factor Plot - make it easy to separate plots by categorical classes
g = sns.factorplot(x= 'Type 1',
                   y= 'Attack',
                   data = df,
                   hue = 'Stage', # Color by stage
                   col = 'Stage', # Separate by stage
                   kind = 'swarm') # Swarmplot
_____no_output_____

# Density Plot_____no_output_____

# Densit Plot - display the distribution between two variables
sns.kdeplot(df.Attack, df.Defense)_____no_output_____

# Joint Distribution Plot_____no_output_____Joint distribution plots combine information from scatter plots and histograms to give you detailed information for bi-variate distributions_____no_output_____

# Joint Distribution Plot
sns.jointplot(x='Attack', y='Defense', data=df)_____no_output_____


# Notebook from bpRsh/shear_analysis_after_dmstack
Path: June_2019/June18/july15_compare_shears_each_file.ipynb

# Table of Contents

1  Introduction

2  Read imcat output final.cat

3  Create new columns

4  Look all Files for gm_sq between 0.7 and 1.0

5  Original fitsfiles obtained from jedisim
_____no_output_____# Introduction

Date: July 25, 2019 Mon

1. In jedisim we used ngals = 10k, z = 1.5 and did 100 simulations. jedisim gives l,l9,m,m9 for each 100 simulations respectively for lsst, lsst90, monochormatic and monochromatic90 cases. In jedisim we have total 100*4 = 400 fits files.

2. From jedisim we get l.fits file and from this file using dmstack we get l.csv file. From 400 jedisim output fitsfiles, we get 400 dmstack output csv files. Each dmstack output csv file has 90 flags and 76 parameters, i.e. in total it has 90+76 = 166 columns such as fluxes, ellipticities and so on.

3. After dmstack we clean and filter l.csv to get l.txt which have no nans, e <= 1.5,
   is not a psf candidate and have no child.
   This file has only few columns: FileNumber(fN), id, x-y, errx-erry, e1-e2, sdssFlux.

4. We use these four l.txt, l9.txt, m.txt, m9.txt file in IMCAT and get final0.cat and combine 100 finalXX.cat files to get final.cat.

5. This lc catalog file final.cat (or its text conversion final_text.txt) has more columns than single final0.cat.
   ```
   fN    00 10 20 30  # fN means file number
   id    00 10 20 30
   flux  00 10 20 30

   x  0 1
   gm 0 1
   gc 0 1

   errx 00 01 10 11 20 21 30 31
   g    00 01 10 11 20 21 30 31 # there is no erry here in imcat output

   So, in total there are
   3 * 4 + 3 * 2 + 2 * 8 = 8 + 6 + 16 = 34 columns in final.cat file.
   ```

**Previous Work**
- The big file final_text.txt has about 200k lines. One row of this file is obtained for combination of l.csv, l9.csv, m.csv, m9.csv.
- I made a flux column by combining these 4 fluxes to one flux so that each row has one total flux column for its four files.
- Now, I sorted the data according to flux and binned the data into N_BUCKETS so that each bucket
  has approx equal number of objects. Then I plotted gm_sq value for each bin.
- Problem: For middle bins (e.g 24,25,26) there are too many objects in the squared reduced shear range of 0.7 to
  1.0 (i.e. 0.7 < gm_sq < 1.0)

**Purpose**
- Now, I will see the distribution of ellipticities in each file.
   _____no_output_____# Read imcat output final.cat_____no_output_____

!head -2 final_text.txt#       fN[0][0]       fN[1][0]       fN[2][0]       fN[3][0]       id[0][0]       id[1][0]       id[2][0]       id[3][0]           x[0]           x[1]     errx[0][0]     errx[0][1]     errx[1][0]     errx[1][1]     errx[2][0]     errx[2][1]     errx[3][0]     errx[3][1]        g[0][0]        g[0][1]        g[1][0]        g[1][1]        g[2][0]        g[2][1]        g[3][0]        g[3][1]     flux[0][0]     flux[1][0]     flux[2][0]     flux[3][0]          gm[0]          gm[1]          gc[0]          gc[1]
               0              0              0              0           5678           5735           5568           5678      1969.2159      2159.7569         0.1046         0.0759         0.1063         0.0745         0.1055         0.0759          0.107         0.0746          1.083        -0.2341         1.1499        -0.4244         1.1705        -0.2617         1.2105        -0.4458      8119.9753      8214.5911      8109.6423      8206.3494        1.11645       -0.32925         1.1905       -0.35375
# find number of lines
!wc -l final_text.txt  183837 final_text.txt
# !tail -2 final_text.txt_____no_output_____# Now we will read file using pandas_____no_output_____import numpy as np
import pandas as pd
import seaborn as sns
sns.set(color_codes=True)

%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
%config InlineBackend.figure_format = 'retina'

import scipy
import scipy.stats as stats

# Jupyter notebook settings for pandas
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', 100) # None for all the rows
pd.set_option('display.max_colwidth', 500)

# %load_ext version_information
# %version_information numpy,  scipy, pandas, sklearn, matplotlib, seaborn_____no_output_____%%javascript
IPython.OutputArea.auto_scroll_threshold = 9999;_____no_output_____# columns names
infile = 'final_text.txt'
headers = pd.read_csv(infile,sep=r'\s+',nrows=1).columns

headers = headers[1:] # remove first # column

print(len(headers))
headers34
df = pd.read_csv(infile,sep=r'\s+',comment='#',header=None)
df.columns = headers
print(df.shape)
df.head().append(df.tail())(183836, 34)

# Create new columns_____no_output_____

# Find total flux, gm**2 and gc**2
df['flux'] = df['flux[0][0]'] + df['flux[1][0]'] + df['flux[2][0]'] + df['flux[3][0]']
df['gm_sq'] = df['gm[0]']**2 + df['gm[1]']**2
df['gc_sq'] = df['gc[0]']**2 + df['gc[1]']**2
df.head()_____no_output_____

# Look all Files for gm_sq between 0.7 and 1.0_____no_output_____

df_07_10 = df.query("0.7 < gm_sq < 1.0")
print(df_07_10.shape)
df_07_10.head(2)(18390, 37)
df_07_10_counts = df_07_10.groupby('fN[0][0]')['gm_sq'].count()
df_07_10_counts.name = 'bad_density_count'
df_07_10_counts.nlargest(10)_____no_output_____df_07_10_counts.nlargest(10).sort_index()
# NOTE: fN[0][0] fN[i][0] four columns have the same values. so we can use any of them.
# these file numbers have highest object density in 0.7 < gm_sq < 1.0_____no_output_____x = df_07_10_counts.values
x_pos = np.arange(len(x))

fig,ax = plt.subplots(figsize=(16,8))
ax.set_facecolor('xkcd:salmon')

plt.vlines(x_pos,ymin=np.zeros_like(x), ymax=x,color='xkcd:brown')
plt.xlabel('Bucket Number')
plt.ylabel('% of bad density')
plt.axhline(y=200,color='blue')
plt.yticks(np.arange(0,260,20));_____no_output_____plt.figure(figsize=(12,8))
sns.distplot(df_07_10_counts,bins=30)
plt.axvline(x=200,color='red')_____no_output_____print(df_07_10_counts[df_07_10_counts>200].shape) # num of files having more than 200 bad density 0.7 to 1.0
df_07_10_counts[df_07_10_counts>200](16,)
df_07_10_counts.nlargest(10).sort_index().index.values_____no_output_____pre = 'lsst_mono_z1.5.fits'_____no_output_____max_count_fN = 3_____no_output_____for l in ['lsst','lsst90','mono','mono90']:
    print('The file ' + l + '_z1.5_{0:03d}.fits has highest density 0.7 < gm_sq < 1.0'.format(max_count_fN))The file lsst_z1.5_003.fits has highest density 0.7 < gm_sq < 1.0
The file lsst90_z1.5_003.fits has highest density 0.7 < gm_sq < 1.0
The file mono_z1.5_003.fits has highest density 0.7 < gm_sq < 1.0
The file mono90_z1.5_003.fits has highest density 0.7 < gm_sq < 1.0

# Original fitsfiles obtained from jedisim

- Github link:  https://github.com/bpJedisim/jout_z1.5_000_099
- Example file: https://github.com/bpJedisim/jout_z1.5_000_099/blob/master/lsst/lsst_z1.5_003.fits
- Example file: https://github.com/bpJedisim/jout_z1.5_000_099/blob/master/lsst90/lsst90_z1.5_003.fits  _____no_output_____

%%bash
#%%writefile SomeFitsFiles/download_fits_github.sh
#!/bin/bash
declare -a LSST=("lsst" "lsst90" "lsst_mono" "lsst_mono90")
declare -a NUMS=(3 17 21)

pre=" https://github.com/bpJedisim/jout_z1.5_000_099/blob/master/"
lst="lsst/lsst_z1.5_003.fits"

for l in "${LSST[@]}"
do
    for num in "${NUMS[@]}"
    do
        n=$(printf "%03d" $num)
        name="${pre}""${l}/""${l}_z1.5_""${n}".fits
        # Note: Do not use "$name" for wget, it gives error then.
        # -nc is no clobber
        #wget -nc ${name}
        echo $name
        break # do not use break in actual code, its just to display few rows in jupyter
    done
donehttps://github.com/bpJedisim/jout_z1.5_000_099/blob/master/lsst/lsst_z1.5_003.fits
https://github.com/bpJedisim/jout_z1.5_000_099/blob/master/lsst90/lsst90_z1.5_003.fits
https://github.com/bpJedisim/jout_z1.5_000_099/blob/master/lsst_mono/lsst_mono_z1.5_003.fits
https://github.com/bpJedisim/jout_z1.5_000_099/blob/master/lsst_mono90/lsst_mono90_z1.5_003.fits
# !open ._____no_output_____


# Notebook from BQSKit/bqskit
Path: examples/tutorials/Partitioning and Optimization.ipynb

# Using Partitioning to Optimize a Circuit

Synthesis is a very powerful circuit optimization technique. However, the input size to even QFAST doesn't scale to larger circuits well. In fact, to be able to synthesize a circuit currently, we will need to be able to simulate it. This will ultimately cap the scaling of synthesis algorithms. However, we can still use a synthesis tool together with partitioner to optimize small blocks of a circuit at a time. BQSKit was designed for this exact use case and in this guide, we will explore how to accomplish this. It is recommended that you read the other tutorials first._____no_output_____

# Load a 16-qubit time evolution circuit generated from the ArQTIC circuit generator.
from bqskit.ir import Circuit

circuit = Circuit.from_file('heisenberg-16-20.qasm')

for gate in circuit.gate_set:
    print(f"{gate} Count:", circuit.count(gate))HGate Count: 240
CNOTGate Count: 360
RXGate Count: 240
RZGate Count: 180
XGate Count: 8

We will partition the circuit and then use the `ForEachBlockPass` to perform operations on the individual blocks. Note the `ForEachBlockPass` will run the sub tasks in parallel using dask._____no_output_____

from bqskit.compiler import CompilationTask
from bqskit.compiler import Compiler
from bqskit.passes import QuickPartitioner
from bqskit.passes import ForEachBlockPass
from bqskit.passes import QSearchSynthesisPass
from bqskit.passes import ScanningGateRemovalPass
from bqskit.passes import UnfoldPass

task = CompilationTask(circuit, [
    QuickPartitioner(3),
    ForEachBlockPass([QSearchSynthesisPass(), ScanningGateRemovalPass()]),
    UnfoldPass(),
])

# Finally, we construct a compiler and submit the task
with Compiler() as compiler:
    synthesized_circuit = compiler.compile(task)

for gate in synthesized_circuit.gate_set:
    print(f"{gate} Count:", synthesized_circuit.count(gate))CNOTGate Count: 230
U3Gate Count: 338

**Replace Filters**

The `ForEachBlockPass` takes an optional parameter `replace_filter` that determines if the circuit resulting from running the input passes on the original block should replace the original block. In the below example, we alter the above flow to only replace a block if it has fewer two-qubit gates as a result of running `QSearchSynthesisPass` and `ScanningGateRemovalPass`.

**Exercise:** Try changing the replace filter to suite your needs. You might want to select circuits with greater parallelism: `circuit.parallelism` or choose based on depth `circuit.depth`. _____no_output_____

from bqskit.ir.gates import CXGate

def less_2q_gates(result_circuit, initial_block_as_op):
    begin_cx_count = initial_block_as_op.gate._circuit.count(CXGate())
    end_cx_count = result_circuit.count(CXGate())
    return end_cx_count < begin_cx_count

task = CompilationTask(circuit, [
    QuickPartitioner(3),
    ForEachBlockPass(
        [QSearchSynthesisPass(), ScanningGateRemovalPass()],
        replace_filter=less_2q_gates
    ),
    UnfoldPass(),
])

# Finally, we construct a compiler and submit the task
with Compiler() as compiler:
    synthesized_circuit = compiler.compile(task)

for gate in synthesized_circuit.gate_set:
    print(f"{gate} Count:", synthesized_circuit.count(gate))HGate Count: 97
CNOTGate Count: 230
RZGate Count: 57
RXGate Count: 115
U3Gate Count: 209
XGate Count: 7

## Gatesets

Just like we changed the gates used by QSearch in the Search Synthesis tutorial, we can change the gates for the entire circuit using the same method.

**Exercise:** Change the gates used in the below example to change the gate set for the circuit._____no_output_____

from bqskit.ir.gates import ISwapGate, U3Gate
from bqskit.passes.search import SimpleLayerGenerator

layer_gen = SimpleLayerGenerator(two_qudit_gate=ISwapGate(), single_qudit_gate_1=U3Gate())

configured_qsearch_pass = QSearchSynthesisPass(layer_generator=layer_gen)

task = CompilationTask(circuit, [
    QuickPartitioner(3),
    ForEachBlockPass([configured_qsearch_pass, ScanningGateRemovalPass()]),
    UnfoldPass(),
])

with Compiler() as compiler:
    synthesized_circuit = compiler.compile(task)

for gate in synthesized_circuit.gate_set:
    print(f"{gate} Count:", synthesized_circuit.count(gate))ISwapGate Count: 256
U3Gate Count: 478

## Block Size

Increasing the partitioner's block size will likely lead to better results at a runtime cost. If you have the computing resources, you can launch a Dask cluster and connect to it via `Compiler()`. The ForEachBlockPass will efficiently distribute the work. See the [Dask documentation](https://docs.dask.org/en/stable/setup.html) for how to launch a cluster._____no_output_____

from bqskit.passes import OptimizedLEAPPass

task = CompilationTask(circuit, [
    QuickPartitioner(4),
    ForEachBlockPass([OptimizedLEAPPass]),
    UnfoldPass(),
])

with Compiler() as compiler:
    synthesized_circuit = compiler.compile(task)

for gate in synthesized_circuit.gate_set:
    print(f"{gate} Count:", synthesized_circuit.count(gate))_____no_output_____

## Iterative Optimization

We have provided support for passes that manage control flow. This enables us to conditionally apply passes or to apply them in a loop. In the below example we will run the partitioning and synthesis sequence in a loop until the circuit stops decreasing in 2-qubit gate count._____no_output_____

from bqskit.compiler import BasePass
from bqskit.passes import WhileLoopPass, GateCountPredicate
from bqskit.ir.gates import CXGate

# Defining a new pass is as easy as implementing a `run` function.
# In this pass, we just print some information about the circuit
class PrintCNOTsPass(BasePass):
    def run(self, circuit, data) -> None:
        print("Current CNOT count:", circuit.count(CXGate()))

task = CompilationTask(circuit, [
    PrintCNOTsPass(),
    WhileLoopPass(
        GateCountPredicate(CXGate()),
        [
            QuickPartitioner(3),
            ForEachBlockPass(
                [
                    QSearchSynthesisPass(),
                    ScanningGateRemovalPass()
                ],
                replace_filter=less_2q_gates
            ),
            UnfoldPass(),
            PrintCNOTsPass(),
        ]
    )
])

with Compiler() as compiler:
    synthesized_circuit = compiler.compile(task)

for gate in synthesized_circuit.gate_set:
    print(f"{gate} Count:", synthesized_circuit.count(gate))Current CNOT count: 360
Current CNOT count: 230
Current CNOT count: 224
Current CNOT count: 224
HGate Count: 91
CNOTGate Count: 224
RZGate Count: 55
RXGate Count: 113
U3Gate Count: 205
XGate Count: 7

There's a lot new in the above example. First, we defined a new pass by subclassing `BasePass` and implementing a `run` method. This pass just prints the number of Controlled-not gates in the circuit when executed. We then use this before and inside a `WhileLoopPass` to see the progress of execution. Second, we perform a `WhileLoopPass` which takes a predicate and a sequence of passes. It will apply the passes supplied until the predicate produces false. We supplied a `GateCountPredicate` which evaluates to False when the specific gate count stops changing._____no_output_____


# Notebook from Vladm0z/hse_hw3_chromhmm
Path: hw3_hmm_A549.ipynb

_____no_output_____## Устанавливаем java и ChromHmm_____no_output_____

!curl -O https://raw.githubusercontent.com/deepjavalibrary/d2l-java/master/tools/fix-colab-gpu.sh && bash fix-colab-gpu.sh  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   155  100   155    0     0   1220      0 --:--:-- --:--:-- --:--:--  1220
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
!curl -O https://raw.githubusercontent.com/deepjavalibrary/d2l-java/master/tools/colab_build.sh && bash colab_build.sh  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   520  100   520    0     0   4227      0 --:--:-- --:--:-- --:--:--  4227
Update environment...
Install Java...
Install Jupyter java kernel...
!java --list-modules | grep "jdk.jshell"jdk.jshell@11.0.14
! wget http://compbio.mit.edu/ChromHMM/ChromHMM.zip--2022-03-27 19:23:42--  http://compbio.mit.edu/ChromHMM/ChromHMM.zip
Resolving compbio.mit.edu (compbio.mit.edu)... 128.30.2.44
Connecting to compbio.mit.edu (compbio.mit.edu)|128.30.2.44|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 42396742 (40M) [application/zip]
Saving to: ‘ChromHMM.zip’

ChromHMM.zip        100%[===================>]  40.43M  11.8MB/s    in 3.4s

2022-03-27 19:23:46 (11.8 MB/s) - ‘ChromHMM.zip’ saved [42396742/42396742]

!unzip /content/ChromHMM.zipArchive:  /content/ChromHMM.zip
   creating: ChromHMM/ANCHORFILES/
   creating: ChromHMM/ANCHORFILES/ce10/
  inflating: ChromHMM/ANCHORFILES/ce10/RefSeqTES.ce10.txt.gz
  inflating: ChromHMM/ANCHORFILES/ce10/RefSeqTSS.ce10.txt.gz
   creating: ChromHMM/ANCHORFILES/ce11/
  inflating: ChromHMM/ANCHORFILES/ce11/RefSeqTES.ce11.txt.gz
  inflating: ChromHMM/ANCHORFILES/ce11/RefSeqTSS.ce11.txt.gz
   creating: ChromHMM/ANCHORFILES/ce6/
  inflating: ChromHMM/ANCHORFILES/ce6/RefSeqTES.ce6.txt.gz
  inflating: ChromHMM/ANCHORFILES/ce6/RefSeqTSS.ce6.txt.gz
   creating: ChromHMM/ANCHORFILES/danRer10/
  inflating: ChromHMM/ANCHORFILES/danRer10/RefSeqTES.danRer10.txt.gz
  inflating: ChromHMM/ANCHORFILES/danRer10/RefSeqTSS.danRer10.txt.gz
   creating: ChromHMM/ANCHORFILES/danRer11/
  inflating: ChromHMM/ANCHORFILES/danRer11/RefSeqTES.danRer11.txt.gz
  inflating: ChromHMM/ANCHORFILES/danRer11/RefSeqTSS.danRer11.txt.gz
   creating: ChromHMM/ANCHORFILES/danRer7/
  inflating: ChromHMM/ANCHORFILES/danRer7/RefSeqTES.danRer7.txt.gz
  inflating: ChromHMM/ANCHORFILES/danRer7/RefSeqTSS.danRer7.txt.gz
   creating: ChromHMM/ANCHORFILES/dm3/
  inflating: ChromHMM/ANCHORFILES/dm3/RefSeqTES.dm3.txt.gz
  inflating: ChromHMM/ANCHORFILES/dm3/RefSeqTSS.dm3.txt.gz
   creating: ChromHMM/ANCHORFILES/dm6/
  inflating: ChromHMM/ANCHORFILES/dm6/RefSeqTES.dm6.txt.gz
  inflating: ChromHMM/ANCHORFILES/dm6/RefSeqTSS.dm6.txt.gz
   creating: ChromHMM/ANCHORFILES/hg18/
  inflating: ChromHMM/ANCHORFILES/hg18/RefSeqTES.hg18.txt.gz
  inflating: ChromHMM/ANCHORFILES/hg18/RefSeqTSS.hg18.txt.gz
   creating: ChromHMM/ANCHORFILES/hg19/
  inflating: ChromHMM/ANCHORFILES/hg19/RefSeqTES.hg19.txt.gz
  inflating: ChromHMM/ANCHORFILES/hg19/RefSeqTSS.hg19.txt.gz
   creating: ChromHMM/ANCHORFILES/hg38/
  inflating: ChromHMM/ANCHORFILES/hg38/RefSeqTES.hg38.txt.gz
  inflating: ChromHMM/ANCHORFILES/hg38/RefSeqTSS.hg38.txt.gz
   creating: ChromHMM/ANCHORFILES/mm10/
  inflating: ChromHMM/ANCHORFILES/mm10/RefSeqTES.mm10.txt.gz
  inflating: ChromHMM/ANCHORFILES/mm10/RefSeqTSS.mm10.txt.gz
   creating: ChromHMM/ANCHORFILES/mm9/
  inflating: ChromHMM/ANCHORFILES/mm9/RefSeqTES.mm9.txt.gz
  inflating: ChromHMM/ANCHORFILES/mm9/RefSeqTSS.mm9.txt.gz
   creating: ChromHMM/ANCHORFILES/rn5/
  inflating: ChromHMM/ANCHORFILES/rn5/RefSeqTES.rn5.txt.gz
  inflating: ChromHMM/ANCHORFILES/rn5/RefSeqTSS.rn5.txt.gz
   creating: ChromHMM/ANCHORFILES/rn6/
  inflating: ChromHMM/ANCHORFILES/rn6/RefSeqTES.rn6.txt.gz
  inflating: ChromHMM/ANCHORFILES/rn6/RefSeqTSS.rn6.txt.gz
  inflating: ChromHMM/ChromHMM.jar
  inflating: ChromHMM/ChromHMM_manual.pdf
   creating: ChromHMM/CHROMSIZES/
  inflating: ChromHMM/CHROMSIZES/ce10.txt
  inflating: ChromHMM/CHROMSIZES/ce11.txt
  inflating: ChromHMM/CHROMSIZES/ce6.txt
  inflating: ChromHMM/CHROMSIZES/danRer10.txt
  inflating: ChromHMM/CHROMSIZES/danRer11.txt
  inflating: ChromHMM/CHROMSIZES/danRer7.txt
  inflating: ChromHMM/CHROMSIZES/dm3.txt
  inflating: ChromHMM/CHROMSIZES/dm6.txt
  inflating: ChromHMM/CHROMSIZES/hg18.txt
  inflating: ChromHMM/CHROMSIZES/hg19.txt
  inflating: ChromHMM/CHROMSIZES/hg38.txt
  inflating: ChromHMM/CHROMSIZES/mm10.txt
  inflating: ChromHMM/CHROMSIZES/mm9.txt
  inflating: ChromHMM/CHROMSIZES/rn5.txt
  inflating: ChromHMM/CHROMSIZES/rn6.txt
   creating: ChromHMM/COORDS/
   creating: ChromHMM/COORDS/ce10/
  inflating: ChromHMM/COORDS/ce10/RefSeqExon.ce10.bed.gz
  inflating: ChromHMM/COORDS/ce10/RefSeqGene.ce10.bed.gz
  inflating: ChromHMM/COORDS/ce10/RefSeqTES.ce10.bed.gz
  inflating: ChromHMM/COORDS/ce10/RefSeqTSS.ce10.bed.gz
  inflating: ChromHMM/COORDS/ce10/RefSeqTSS2kb.ce10.bed.gz
   creating: ChromHMM/COORDS/ce11/
  inflating: ChromHMM/COORDS/ce11/RefSeqExon.ce11.bed.gz
  inflating: ChromHMM/COORDS/ce11/RefSeqGene.ce11.bed.gz
  inflating: ChromHMM/COORDS/ce11/RefSeqTES.ce11.bed.gz
  inflating: ChromHMM/COORDS/ce11/RefSeqTSS.ce11.bed.gz
  inflating: ChromHMM/COORDS/ce11/RefSeqTSS2kb.ce11.bed.gz
   creating: ChromHMM/COORDS/ce6/
  inflating: ChromHMM/COORDS/ce6/RefSeqExon.ce6.bed.gz
  inflating: ChromHMM/COORDS/ce6/RefSeqGene.ce6.bed.gz
  inflating: ChromHMM/COORDS/ce6/RefSeqTES.ce6.bed.gz
  inflating: ChromHMM/COORDS/ce6/RefSeqTSS.ce6.bed.gz
  inflating: ChromHMM/COORDS/ce6/RefSeqTSS2kb.ce6.bed.gz
   creating: ChromHMM/COORDS/danRer10/
  inflating: ChromHMM/COORDS/danRer10/RefSeqExon.danRer10.bed.gz
  inflating: ChromHMM/COORDS/danRer10/RefSeqGene.danRer10.bed.gz
  inflating: ChromHMM/COORDS/danRer10/RefSeqTES.danRer10.bed.gz
  inflating: ChromHMM/COORDS/danRer10/RefSeqTSS.danRer10.bed.gz
  inflating: ChromHMM/COORDS/danRer10/RefSeqTSS2kb.danRer10.bed.gz
   creating: ChromHMM/COORDS/danRer11/
  inflating: ChromHMM/COORDS/danRer11/RefSeqExon.danRer11.bed.gz
  inflating: ChromHMM/COORDS/danRer11/RefSeqGene.danRer11.bed.gz
  inflating: ChromHMM/COORDS/danRer11/RefSeqTES.danRer11.bed.gz
  inflating: ChromHMM/COORDS/danRer11/RefSeqTSS.danRer11.bed.gz
  inflating: ChromHMM/COORDS/danRer11/RefSeqTSS2kb.danRer11.bed.gz
   creating: ChromHMM/COORDS/danRer7/
  inflating: ChromHMM/COORDS/danRer7/RefSeqExon.danRer7.bed.gz
  inflating: ChromHMM/COORDS/danRer7/RefSeqGene.danRer7.bed.gz
  inflating: ChromHMM/COORDS/danRer7/RefSeqTES.danRer7.bed.gz
  inflating: ChromHMM/COORDS/danRer7/RefSeqTSS.danRer7.bed.gz
  inflating: ChromHMM/COORDS/danRer7/RefSeqTSS2kb.danRer7.bed.gz
   creating: ChromHMM/COORDS/dm3/
  inflating: ChromHMM/COORDS/dm3/RefSeqExon.dm3.bed.gz
  inflating: ChromHMM/COORDS/dm3/RefSeqGene.dm3.bed.gz
  inflating: ChromHMM/COORDS/dm3/RefSeqTES.dm3.bed.gz
  inflating: ChromHMM/COORDS/dm3/RefSeqTSS.dm3.bed.gz
  inflating: ChromHMM/COORDS/dm3/RefSeqTSS2kb.dm3.bed.gz
   creating: ChromHMM/COORDS/dm6/
  inflating: ChromHMM/COORDS/dm6/RefSeqExon.dm6.bed.gz
  inflating: ChromHMM/COORDS/dm6/RefSeqGene.dm6.bed.gz
  inflating: ChromHMM/COORDS/dm6/RefSeqTES.dm6.bed.gz
  inflating: ChromHMM/COORDS/dm6/RefSeqTSS.dm6.bed.gz
  inflating: ChromHMM/COORDS/dm6/RefSeqTSS2kb.dm6.bed.gz
   creating: ChromHMM/COORDS/hg18/
  inflating: ChromHMM/COORDS/hg18/CpGIsland.hg18.bed.gz
 extracting: ChromHMM/COORDS/hg18/laminB1lads.hg18.bed.gz
  inflating: ChromHMM/COORDS/hg18/RefSeqExon.hg18.bed.gz
  inflating: ChromHMM/COORDS/hg18/RefSeqGene.hg18.bed.gz
  inflating: ChromHMM/COORDS/hg18/RefSeqTES.hg18.bed.gz
  inflating: ChromHMM/COORDS/hg18/RefSeqTSS.hg18.bed.gz
  inflating: ChromHMM/COORDS/hg18/RefSeqTSS2kb.hg18.bed.gz
   creating: ChromHMM/COORDS/hg19/
  inflating: ChromHMM/COORDS/hg19/CpGIsland.hg19.bed.gz
 extracting: ChromHMM/COORDS/hg19/laminB1lads.hg19.bed.gz
  inflating: ChromHMM/COORDS/hg19/RefSeqExon.hg19.bed.gz
  inflating: ChromHMM/COORDS/hg19/RefSeqGene.hg19.bed.gz
  inflating: ChromHMM/COORDS/hg19/RefSeqTES.hg19.bed.gz
  inflating: ChromHMM/COORDS/hg19/RefSeqTSS.hg19.bed.gz
  inflating: ChromHMM/COORDS/hg19/RefSeqTSS2kb.hg19.bed.gz
   creating: ChromHMM/COORDS/hg38/
  inflating: ChromHMM/COORDS/hg38/CpGIsland.hg38.bed.gz
  inflating: ChromHMM/COORDS/hg38/RefSeqExon.hg38.bed.gz
  inflating: ChromHMM/COORDS/hg38/RefSeqGene.hg38.bed.gz
  inflating: ChromHMM/COORDS/hg38/RefSeqTES.hg38.bed.gz
  inflating: ChromHMM/COORDS/hg38/RefSeqTSS.hg38.bed.gz
  inflating: ChromHMM/COORDS/hg38/RefSeqTSS2kb.hg38.bed.gz
   creating: ChromHMM/COORDS/mm10/
  inflating: ChromHMM/COORDS/mm10/CpGIsland.mm10.bed.gz
  inflating: ChromHMM/COORDS/mm10/RefSeqExon.mm10.bed.gz
  inflating: ChromHMM/COORDS/mm10/RefSeqGene.mm10.bed.gz
  inflating: ChromHMM/COORDS/mm10/RefSeqTES.mm10.bed.gz
  inflating: ChromHMM/COORDS/mm10/RefSeqTSS.mm10.bed.gz
  inflating: ChromHMM/COORDS/mm10/RefSeqTSS2kb.mm10.bed.gz
   creating: ChromHMM/COORDS/mm9/
  inflating: ChromHMM/COORDS/mm9/CpGIsland.mm9.bed.gz
  inflating: ChromHMM/COORDS/mm9/RefSeqExon.mm9.bed.gz
  inflating: ChromHMM/COORDS/mm9/RefSeqGene.mm9.bed.gz
  inflating: ChromHMM/COORDS/mm9/RefSeqTES.mm9.bed.gz
  inflating: ChromHMM/COORDS/mm9/RefSeqTSS.mm9.bed.gz
  inflating: ChromHMM/COORDS/mm9/RefSeqTSS2kb.mm9.bed.gz
   creating: ChromHMM/COORDS/rn5/
  inflating: ChromHMM/COORDS/rn5/CpGIsland.rn5.bed.gz
  inflating: ChromHMM/COORDS/rn5/RefSeqExon.rn5.bed.gz
  inflating: ChromHMM/COORDS/rn5/RefSeqGene.rn5.bed.gz
  inflating: ChromHMM/COORDS/rn5/RefSeqTES.rn5.bed.gz
  inflating: ChromHMM/COORDS/rn5/RefSeqTSS.rn5.bed.gz
  inflating: ChromHMM/COORDS/rn5/RefSeqTSS2kb.rn5.bed.gz
   creating: ChromHMM/COORDS/rn6/
  inflating: ChromHMM/COORDS/rn6/CpGIsland.rn6.bed.gz
  inflating: ChromHMM/COORDS/rn6/RefSeqExon.rn6.bed.gz
  inflating: ChromHMM/COORDS/rn6/RefSeqGene.rn6.bed.gz
  inflating: ChromHMM/COORDS/rn6/RefSeqTES.rn6.bed.gz
  inflating: ChromHMM/COORDS/rn6/RefSeqTSS.rn6.bed.gz
  inflating: ChromHMM/COORDS/rn6/RefSeqTSS2kb.rn6.bed.gz
   creating: ChromHMM/SAMPLEDATA_HG18/
  inflating: ChromHMM/SAMPLEDATA_HG18/GM12878_chr11_binary.txt.gz
  inflating: ChromHMM/SAMPLEDATA_HG18/K562_chr11_binary.txt.gz
   creating: ChromHMM/SRC/
   creating: ChromHMM/SRC/edu/
   creating: ChromHMM/SRC/edu/mit/
   creating: ChromHMM/SRC/edu/mit/compbio/
   creating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/BrowserOutput.java
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/ChromHMM.java
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/ConvertGeneTable.java
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/NestedEliminateInitialize.java
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/Preprocessing.java
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/StateAnalysis.java
  inflating: ChromHMM/SRC/edu/mit/compbio/ChromHMM/Util.java
   creating: ChromHMM/SRC/org/
   creating: ChromHMM/SRC/org/tc33/
   creating: ChromHMM/SRC/org/tc33/jheatchart/
  inflating: ChromHMM/SRC/org/tc33/jheatchart/HeatChart.java

## Скачиваем файлы_____no_output_____

!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k27acDex100nmAlnRep1.bam -O H3K27ac.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k27me3Dex100nmAlnRep1.bam -O H3K27me3.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k36me3Dex100nmAlnRep1.bam -O H3K36me3.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k04me1Dex100nmAlnRep1.bam -O H3K4me1.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k04me2Dex100nmAlnRep1.bam -O H3K4me2.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k04me3Dex100nmAlnRep1.bam -O H3K4me3.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k79me2Dex100nmAlnRep1.bam -O H3K79me2.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k09acEtoh02AlnRep1.bam -O H3K9ac.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k09me3Etoh02AlnRep1.bam -O H3K9me3.bam
!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H4k20me1Etoh02AlnRep1.bam -O H4K20me1.bam--2022-03-27 19:23:47--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k27acDex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1613138298 (1.5G) [application/octet-stream]
Saving to: ‘H3K27ac.bam’

H3K27ac.bam         100%[===================>]   1.50G  46.6MB/s    in 33s

2022-03-27 19:24:20 (46.3 MB/s) - ‘H3K27ac.bam’ saved [1613138298/1613138298]

--2022-03-27 19:24:20--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k27me3Dex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1204886525 (1.1G) [application/octet-stream]
Saving to: ‘H3K27me3.bam’

H3K27me3.bam        100%[===================>]   1.12G  44.9MB/s    in 26s

2022-03-27 19:24:47 (43.8 MB/s) - ‘H3K27me3.bam’ saved [1204886525/1204886525]

--2022-03-27 19:24:47--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k36me3Dex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1171206285 (1.1G) [application/octet-stream]
Saving to: ‘H3K36me3.bam’

H3K36me3.bam        100%[===================>]   1.09G  46.6MB/s    in 25s

2022-03-27 19:25:12 (45.5 MB/s) - ‘H3K36me3.bam’ saved [1171206285/1171206285]

--2022-03-27 19:25:12--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k04me1Dex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1457394253 (1.4G) [application/octet-stream]
Saving to: ‘H3K4me1.bam’

H3K4me1.bam         100%[===================>]   1.36G  47.0MB/s    in 31s

2022-03-27 19:25:43 (44.4 MB/s) - ‘H3K4me1.bam’ saved [1457394253/1457394253]

--2022-03-27 19:25:43--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k04me2Dex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1087535456 (1.0G) [application/octet-stream]
Saving to: ‘H3K4me2.bam’

H3K4me2.bam         100%[===================>]   1.01G  49.0MB/s    in 22s

2022-03-27 19:26:05 (47.7 MB/s) - ‘H3K4me2.bam’ saved [1087535456/1087535456]

--2022-03-27 19:26:05--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k04me3Dex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1107774312 (1.0G) [application/octet-stream]
Saving to: ‘H3K4me3.bam’

H3K4me3.bam         100%[===================>]   1.03G  50.2MB/s    in 22s

2022-03-27 19:26:28 (48.3 MB/s) - ‘H3K4me3.bam’ saved [1107774312/1107774312]

--2022-03-27 19:26:28--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k79me2Dex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 964729136 (920M) [application/octet-stream]
Saving to: ‘H3K79me2.bam’

H3K79me2.bam        100%[===================>] 920.04M  49.2MB/s    in 20s

2022-03-27 19:26:48 (45.7 MB/s) - ‘H3K79me2.bam’ saved [964729136/964729136]

--2022-03-27 19:26:48--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k09acEtoh02AlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1805271664 (1.7G) [application/octet-stream]
Saving to: ‘H3K9ac.bam’

H3K9ac.bam          100%[===================>]   1.68G  51.1MB/s    in 36s

2022-03-27 19:27:24 (48.3 MB/s) - ‘H3K9ac.bam’ saved [1805271664/1805271664]

--2022-03-27 19:27:24--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H3k09me3Etoh02AlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3159610200 (2.9G) [application/octet-stream]
Saving to: ‘H3K9me3.bam’

H3K9me3.bam         100%[===================>]   2.94G  41.3MB/s    in 66s

2022-03-27 19:28:30 (45.6 MB/s) - ‘H3K9me3.bam’ saved [3159610200/3159610200]

--2022-03-27 19:28:30--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549H4k20me1Etoh02AlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1494698977 (1.4G) [application/octet-stream]
Saving to: ‘H4K20me1.bam’

H4K20me1.bam        100%[===================>]   1.39G  47.0MB/s    in 31s

2022-03-27 19:29:02 (45.8 MB/s) - ‘H4K20me1.bam’ saved [1494698977/1494698977]

!wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549ControlDex100nmAlnRep1.bam -O Control.bam--2022-03-27 19:29:02--  http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneA549ControlDex100nmAlnRep1.bam
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1331192042 (1.2G) [application/octet-stream]
Saving to: ‘Control.bam’

Control.bam         100%[===================>]   1.24G  7.15MB/s    in 2m 10s

2022-03-27 19:31:12 (9.74 MB/s) - ‘Control.bam’ saved [1331192042/1331192042]

* Вручную создаем текстовый файл cellmarkfiletable.txt, в котором указываем название типа клеток, разных гистоновых меток, а также соответствующие .bam файлы для эксперимента и контроля. Один и тот же контрольный файл .bam может быть использован для всех экспериментов.

* Более подробно о содержании файла cellmarkfiletable.txt можно посмотреть в руководстве пользователя ChromHMM

* Файл cellmarkfiletable.txt добавляем в github репозиторий для отчета_____no_output_____

import os

# !> cellmarkfiletable.txt
control = 'Control.bam'

with open(f'cellmarkfiletable.txt', 'a') as the_file:
  for file in os.listdir():
    if file[-3:] == 'bam' and "Control" not in file:
      the_file.write(f'A549\t{file[:-4]}\t{file}\t{control}\n')_____no_output_____

Запускаем ChromHMM с опцией BinarizeBam, чтобы конвертировать профили из ChIP-seq экспериментов (bam-файлы) в табличку из 0 и 1, т.е. чтобы сделать разбивку генома на условные интервалы (бины) длиной 200 п.о.
Для 11 меток программа работает около 5 мин
_____no_output_____

!java -mx5000M -jar /content/ChromHMM/ChromHMM.jar BinarizeBam -b 200 \
  /content/ChromHMM/CHROMSIZES/hg19.txt /content/ cellmarkfiletable.txt binarizedDataWriting to file binarizedData/A549_chr1_binary.txt
Writing to file binarizedData/A549_chr2_binary.txt
Writing to file binarizedData/A549_chr3_binary.txt
Writing to file binarizedData/A549_chr4_binary.txt
Writing to file binarizedData/A549_chr5_binary.txt
Writing to file binarizedData/A549_chr6_binary.txt
Writing to file binarizedData/A549_chr7_binary.txt
Writing to file binarizedData/A549_chrX_binary.txt
Writing to file binarizedData/A549_chr8_binary.txt
Writing to file binarizedData/A549_chr9_binary.txt
Writing to file binarizedData/A549_chr10_binary.txt
Writing to file binarizedData/A549_chr11_binary.txt
Writing to file binarizedData/A549_chr12_binary.txt
Writing to file binarizedData/A549_chr13_binary.txt
Writing to file binarizedData/A549_chr14_binary.txt
Writing to file binarizedData/A549_chr15_binary.txt
Writing to file binarizedData/A549_chr16_binary.txt
Writing to file binarizedData/A549_chr17_binary.txt
Writing to file binarizedData/A549_chr18_binary.txt
Writing to file binarizedData/A549_chr20_binary.txt
Writing to file binarizedData/A549_chrY_binary.txt
Writing to file binarizedData/A549_chr19_binary.txt
Writing to file binarizedData/A549_chr22_binary.txt
Writing to file binarizedData/A549_chr21_binary.txt
Writing to file binarizedData/A549_chrM_binary.txt

Запускаем ChromHMM с опцией LearnModel (см. руководство пользователя), которая автоматически определит параметры N разных эпигенетических типов с наиболее выраженными наборами гистоновых меток и присвоит каждому геномному интервалу определенный эпигенетический тип. Количество разных эпигенетических типов (или состояний) выбираете сами (например 10 штук).
Не забудьте, что мы работаем с версией референсного генома человека hg19
Для 11 меток программа работает около 10 минут
_____no_output_____

!java -mx5000M -jar /content/ChromHMM/ChromHMM.jar LearnModel -b 200 \
  /content/binarizedData/ /content/data 15 hg19Writing to file /content/data/transitions_15.txt
Writing to file /content/data/emissions_15.txt
Writing to file /content/data/emissions_15.svg
Writing to file /content/data/emissions_15.png
Writing to file /content/data/transitions_15.png
Writing to file /content/data/transitions_15.svg
Writing to file /content/data/model_15.txt
 Iteration  Estimated Log Likelihood     Change    Total Time (secs)
         1             -11824747.261          -                 25.8
         2             -10109169.779 1715577.482                 51.0
         3              -9658984.956 450184.824                 74.2
         4              -9435565.212 223419.744                 93.6
         5              -9341831.714  93733.497                112.9
         6              -9307841.253  33990.461                132.2
         7              -9295257.958  12583.295                154.5
         8              -9290052.592   5205.366                175.1
         9              -9287596.004   2456.588                195.7
        10              -9286275.685   1320.319                219.2
        11              -9285476.889    798.795                240.1
        12              -9284937.643    539.246                261.1
        13              -9284533.349    404.295                282.2
        14              -9284200.368    332.981                303.0
        15              -9283901.222    299.146                323.9
        16              -9283609.357    291.865                344.7
        17              -9283306.050    303.307                365.5
        18              -9282969.225    336.825                386.4
        19              -9282551.357    417.868                407.2
        20              -9281904.137    647.220                428.0
        21              -9280803.712   1100.426                448.8
        22              -9279147.516   1656.196                469.6
        23              -9277305.585   1841.931                490.3
        24              -9275678.881   1626.704                511.1
        25              -9274390.016   1288.865                532.0
        26              -9273405.014    985.002                552.9
        27              -9272651.551    753.463                573.7
        28              -9272067.991    583.560                594.6
        29              -9271604.615    463.376                615.5
        30              -9271224.208    380.407                636.3
        31              -9270899.814    324.394                657.2
        32              -9270612.334    287.481                678.1
        33              -9270348.116    264.218                699.0
        34              -9270096.928    251.188                719.8
        35              -9269851.291    245.637                740.7
        36              -9269606.073    245.218                761.7
        37              -9269356.731    249.342                782.6
        38              -9269095.627    261.103                803.6
        39              -9268808.510    287.117                824.6
        40              -9268476.658    331.852                845.5
        41              -9268081.012    395.646                866.6
        42              -9267604.110    476.902                887.5
        43              -9267057.090    547.020                908.4
        44              -9266460.249    596.841                929.4
        45              -9265746.177    714.072                950.6
        46              -9264614.258   1131.919                971.7
        47              -9262248.342   2365.916                992.7
        48              -9256944.469   5303.873               1013.9
        49              -9247942.422   9002.047               1035.1
        50              -9238223.980   9718.442               1056.2
        51              -9230296.861   7927.119               1077.7
        52              -9226705.619   3591.241               1099.2
        53              -9225395.026   1310.594               1120.8
        54              -9224773.986    621.040               1142.2
        55              -9224430.837    343.149               1163.7
        56              -9224222.222    208.615               1185.4
        57              -9224086.853    135.370               1207.1
        58              -9223993.770     93.082               1228.9
        59              -9223925.482     68.288               1250.5
        60              -9223871.391     54.091               1272.2
        61              -9223824.857     46.534               1294.0
        62              -9223781.812     43.045               1315.5
        63              -9223740.108     41.704               1337.2
        64              -9223699.112     40.996               1358.8
        65              -9223659.295     39.817               1380.5
        66              -9223621.711     37.584               1402.2
        67              -9223587.443     34.268               1423.9
        68              -9223557.204     30.239               1445.6
        69              -9223531.198     26.006               1467.2
        70              -9223509.199     21.999               1488.9
        71              -9223490.743     18.456               1510.6
        72              -9223475.296     15.447               1532.6
        73              -9223462.351     12.945               1554.2
        74              -9223451.474     10.877               1575.9
        75              -9223442.308      9.166               1598.1
        76              -9223434.562      7.746               1619.8
        77              -9223427.994      6.568               1641.4
        78              -9223422.416      5.578               1662.9
        79              -9223417.663      4.754               1684.4
        80              -9223413.599      4.064               1706.1
        81              -9223410.115      3.484               1727.6
        82              -9223407.117      2.998               1749.1
        83              -9223404.528      2.588               1770.7
        84              -9223402.286      2.242               1792.1
        85              -9223400.336      1.950               1813.6
        86              -9223398.635      1.701               1835.2
        87              -9223397.146      1.490               1856.8
        88              -9223395.838      1.308               1878.3
        89              -9223394.684      1.153               1899.8
        90              -9223393.666      1.019               1921.3
        91              -9223392.762      0.904               1942.8
        92              -9223391.958      0.803               1964.5
        93              -9223391.242      0.716               1986.0
        94              -9223390.602      0.640               2007.5
        95              -9223390.028      0.574               2029.0
        96              -9223389.512      0.516               2050.6
        97              -9223389.049      0.463               2072.1
        98              -9223388.631      0.418               2093.6
        99              -9223388.252      0.378               2115.1
       100              -9223387.910      0.342               2136.6
       101              -9223387.599      0.311               2158.2
       102              -9223387.317      0.282               2179.7
       103              -9223387.060      0.257               2201.3
       104              -9223386.826      0.234               2222.7
       105              -9223386.612      0.214               2244.2
       106              -9223386.417      0.196               2265.7
       107              -9223386.238      0.179               2287.2
       108              -9223386.073      0.164               2308.7
       109              -9223385.923      0.151               2330.2
       110              -9223385.784      0.138               2351.7
       111              -9223385.657      0.127               2373.1
       112              -9223385.539      0.117               2394.6
       113              -9223385.431      0.108               2416.0
       114              -9223385.331      0.100               2437.5
       115              -9223385.239      0.092               2459.1
       116              -9223385.153      0.086               2480.6
       117              -9223385.074      0.079               2502.1
       118              -9223385.000      0.073               2523.6
       119              -9223384.932      0.068               2545.0
       120              -9223384.869      0.063               2566.5
       121              -9223384.810      0.059               2588.0
       122              -9223384.756      0.054               2609.5
       123              -9223384.705      0.051               2631.0
       124              -9223384.657      0.048               2652.4
       125              -9223384.613      0.044               2673.9
       126              -9223384.572      0.041               2695.4
       127              -9223384.534      0.038               2716.9
       128              -9223384.498      0.036               2738.4
       129              -9223384.464      0.033               2759.9
       130              -9223384.433      0.032               2781.4
       131              -9223384.403      0.029               2803.0
       132              -9223384.376      0.027               2824.5
       133              -9223384.350      0.026               2846.0
       134              -9223384.326      0.024               2867.5
       135              -9223384.304      0.022               2888.9
       136              -9223384.282      0.021               2910.4
       137              -9223384.263      0.020               2931.9
       138              -9223384.244      0.019               2953.4
       139              -9223384.226      0.018               2974.9
       140              -9223384.210      0.017               2996.4
       141              -9223384.194      0.016               3017.9
       142              -9223384.180      0.014               3039.6
       143              -9223384.166      0.014               3061.2
       144              -9223384.153      0.013               3082.8
       145              -9223384.141      0.012               3104.3
       146              -9223384.129      0.012               3125.9
       147              -9223384.118      0.011               3147.4
       148              -9223384.108      0.010               3169.0
       149              -9223384.099      0.010               3190.6
       150              -9223384.090      0.009               3212.2
       151              -9223384.081      0.009               3233.7
       152              -9223384.073      0.008               3255.3
       153              -9223384.065      0.008               3276.9
       154              -9223384.058      0.008               3298.4
       155              -9223384.051      0.007               3319.9
       156              -9223384.044      0.006               3341.4
       157              -9223384.038      0.007               3362.9
       158              -9223384.032      0.006               3384.3
       159              -9223384.026      0.006               3405.8
       160              -9223384.020      0.006               3427.3
       161              -9223384.015      0.006               3448.9
       162              -9223384.010      0.005               3470.4
       163              -9223384.010     -0.001               3492.1
Writing to file /content/data/A549_15_segments.bed
Writing to file /content/data/A549_15_dense.bed
Writing to file /content/data/A549_15_expanded.bed
Writing to file /content/data/A549_15_overlap.txt
Writing to file /content/data/A549_15_overlap.png
Writing to file /content/data/A549_15_overlap.svg
Writing to file /content/data/A549_15_RefSeqTSS_neighborhood.txt
Writing to file /content/data/A549_15_RefSeqTSS_neighborhood.png
Writing to file /content/data/A549_15_RefSeqTSS_neighborhood.svg
Writing to file /content/data/A549_15_RefSeqTES_neighborhood.txt
Writing to file /content/data/A549_15_RefSeqTES_neighborhood.png
Writing to file /content/data/A549_15_RefSeqTES_neighborhood.svg
Warning could not automatically open in a browser /content/data/webpage_15.html

В результате выполнения команды LearnModel будет создан набор файлов (в том числе HTML страничка) в папке выдачи, которая была указана при запуске. Скачиваем эту папку себе на копьютер и открываем HTML файл._____no_output_____

from google.colab import files
import os

files.download('cellmarkfiletable.txt')

for file in os.listdir('/content/data/'):
  files.download(f'/content/data/{file}')_____no_output_____! touch A549_15_dense_new.bed_____no_output_____from google.colab import files
import os

states = ['Active_Promoter',
          'Weak_Enhancer',
          'Strong_Enhancer',
          'Active_Promoter',
          'Active_Promoter',
          'Weak_Enhancer',
          'Weak_Enhancer',
          'Weak_Enhancer',
          'Weak_Enhancer',
          'Weak_Transcribed',
          'Weak_Transcribed',
          'Weak_Transcribed',
          'Repressed',
          'Heterochromatin',
          'Heterochromatin']

with open(f'data/A549_15_dense.bed', 'r') as old_f:
  with open(f'A549_15_dense_new.bed', 'a') as new_f:
    lines = old_f.readlines()
    new_f.write(lines[0])
    for line in lines[1:]:
        l = line.split('\t')
        l[3] = l[3] + '_' + states[int(l[3]) - 1]
        new_f.write('\t'.join(l))_____no_output_____files.download('A549_15_dense_new.bed')_____no_output_____


# Notebook from single-cell-genetics/singlecell_neuroseq_paper
Path: plotting_notebooks/Supplementary_Figures/Supplementary_Figure_6d.ipynb

<code>
library(dplyr)
library(ggplot2)
library(ggbeeswarm)
Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

leads = read.csv("/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/eqtl/all_leads_5pct_FDR_Storey.csv")
head(leads,2)_____no_output_____# annos_file = "/hps/nobackup/hipsci/scratch/singlecell_endodiff/data_processed/scQTLs/annos/combined_feature_id_annos.tsv"
annos_file = "/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/annotation_gene_level.tsv"
annos = read.csv(annos_file,sep="\t")
head(annos,2)_____no_output_____# example 1
gene = "SFXN5"
# D52 Sert ROT_____no_output_____### rsid (Sert): rs4500972_____no_output_____annos[annos$hgnc_symbol == gene,]_____no_output_____# #### get expression
mydir = "/nfs/leia/research/stegle/dseaton/hipsci/singlecell_neuroseq/data/data_processed/pool1_17_D52/"
myfile = paste0(mydir,"pool1_17_D52.scanpy.w_metadata.w_celltype.scanpy.celltype.Sert.groupedby.donor_id-celltype-treatment.mean.tsv")
df = read.csv(myfile,sep="\t")
df[1:5,1:5]_____no_output_____good_donors = df[df$n_cells >50 & df$treatment == 'ROT',c("donor_id","treatment")]$donor_id_____no_output_____mydir = "/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/eqtl/timepoint_D52/input_files_ROT_treated/celltype_Sert/"
pheno_file = paste0(mydir, "phenotypes.tsv")
pheno = read.csv(pheno_file,sep="\t")
head(pheno,2)_____no_output_____df_e = data.frame(donor_id = gsub("\\.","-",colnames(pheno)[2:ncol(pheno)]),
               gene = t(pheno[pheno$ensembl_gene_id == 'ENSG00000144040',2:ncol(pheno)]))
colnames(df_e)[2] = "SFXN5"
head(df_e,2)_____no_output_____covs_file = paste0(mydir, "covariates.tsv")
covs = read.csv(covs_file,sep="\t")
colnames(covs)[1] = "donor_id"
head(covs,2)_____no_output_____sample_list = as.character(unique(df$donor_id))
length(sample_list)
head(sample_list)_____no_output_____# write.csv(data.frame(samples = sample_list),"/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/coloc/samples_Sert_D52_ROT.csv")_____no_output_____genos = read.csv("/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/coloc/genotypes_2_73767897_G_A_samples_Sert_D52_ROT.csv")
genos = read.csv("/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/coloc/genotypes_2_73767897_G_A_samples_Sert_D52_ROT_new_plink.csv")

colnames(genos) = c("donor_id","genotype")
head(genos)_____no_output_____# df_e = df[,c("donor_id",gene)]
# head(df_e)_____no_output_____df_box = inner_join(genos, inner_join(df_e,covs))
nrow(df_box)
head(df_box,2)Joining, by = "donor_id"
Joining, by = "donor_id"
Warning message:
“Column `donor_id` joining factors with different levels, coercing to character vector”snp = "2_73767897_G_A"_____no_output_____# try regressing out covariates_____no_output_____options(repr.plot.width=4, repr.plot.height=3.8)
mylm = lm(SFXN5 ~ PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10+PC11+PC12+PC13+PC14+PC15, data = df_box)
df_box$res_SFXN5 = summary(mylm)$res
# summary(mylm)$res_____no_output_____# ggplot(df_box,
ggplot(df_box[df_box$donor_id %in% good_donors,],
       aes(x = as.character(genotype), y = SFXN5)) + xlab(snp) + theme_classic() +
    geom_violin() + geom_quasirandom(alpha = 0.5, size = 0.5) + geom_boxplot(width=0.2) + ggtitle("Sert_D52_ROT")_____no_output_____fig_dir = "/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/figures/extended_figures/"
pdf(paste0(fig_dir,"Supp_Fig_6d_SFXN5.pdf"), width=4, height=3.8)
ggplot(df_box[df_box$donor_id %in% good_donors,],
       aes(x = as.character(genotype), y = SFXN5)) + xlab(snp) + theme_classic() +
    geom_violin() + geom_quasirandom(alpha = 0.5, size = 0.5) + geom_boxplot(width=0.2) + ggtitle("Sert_D52_ROT")
dev.off()_____no_output_____# example 2
gene = "FGFR1"
# D11 FPP (and D11 P_FPP)_____no_output_____annos[annos$hgnc_symbol == gene,]_____no_output_____### rsid (FPP): rs3925
### rsid (P_FPP): _____no_output_____leads[leads$feature_id == as.character(annos[annos$hgnc_symbol == gene,"ensembl_gene_id"]),]Warning message in cbind(parts$left, ellip_h, parts$right, deparse.level = 0L):
“number of rows of result is not a multiple of vector length (arg 2)”Warning message in cbind(parts$left, ellip_h, parts$right, deparse.level = 0L):
“number of rows of result is not a multiple of vector length (arg 2)”Warning message in cbind(parts$left, ellip_h, parts$right, deparse.level = 0L):
“number of rows of result is not a multiple of vector length (arg 2)”Warning message in cbind(parts$left, ellip_h, parts$right, deparse.level = 0L):
“number of rows of result is not a multiple of vector length (arg 2)”snp = leads[leads$feature_id == as.character(annos[annos$hgnc_symbol == gene,"ensembl_gene_id"])
            & leads$label == "P_FPP_D11","snp_id"]_____no_output_____#### get expression
mydir = "/nfs/leia/research/stegle/dseaton/hipsci/singlecell_neuroseq/data/data_processed/pool1_13_noddd_D11/"
myfile = paste0(mydir,"pool1_13_noddd_D11.scanpy.w_metadata.w_celltype.scanpy.celltype.P_FPP.groupedby.donor_id-celltype.mean.tsv")
df = read.csv(myfile,sep="\t")
head(df)ERROR while rich displaying an object: Error in sprintf(wrap, header, body): 'fmt' length exceeds maximal format length 8192

Traceback:
1. FUN(X[[i]], ...)
2. tryCatch(withCallingHandlers({
 .     if (!mime %in% names(repr::mime2repr))
 .         stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
 .     rpr <- repr::mime2repr[[mime]](obj)
 .     if (is.null(rpr))
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler), error = outer_handler)
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. doTryCatch(return(expr), name, parentenv, handler)
6. withCallingHandlers({
 .     if (!mime %in% names(repr::mime2repr))
 .         stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
 .     rpr <- repr::mime2repr[[mime]](obj)
 .     if (is.null(rpr))
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler)
7. repr::mime2repr[[mime]](obj)
8. repr_latex.data.frame(obj)
9. repr_matrix_generic(obj, sprintf("\\begin{tabular}{%s}\n%%s%%s\\end{tabular}\n",
 .     cols), "%s\\\\\n\\hline\n", "  &", " %s &", "%s", "\t%s\\\\\n",
 .     "%s &", " %s &", escape_fun = latex_escape_vec, ...)
10. sprintf(wrap, header, body)
sample_list = as.character(unique(df$donor_id))
length(sample_list)
head(sample_list)_____no_output_____write.csv(data.frame(samples = sample_list),"/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/coloc/samples_P_FPP_D11.csv")_____no_output_____genos = read.csv("/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/coloc/genotypes_8_38281658_G_A_samples_P_FPP_D11.csv")
# genos = read.csv("/hps/nobackup/stegle/users/acuomo/all_scripts/sc_neuroseq/coloc/genotypes_8_38281658_G_A_samples_P_FPP_D11_new_plink.csv")
colnames(genos) = c("donor_id","genotype")
head(genos)_____no_output_____df_e = df[,c("donor_id",gene)]
head(df_e)_____no_output_____df_box = as.data.frame(inner_join(genos, df_e))
nrow(df_box)
head(df_box,2)Joining, by = "donor_id"
options(repr.plot.width=4, repr.plot.height=3.8)
ggplot(df_box, aes(x = as.character(genotype), y = FGFR1)) + xlab(snp) + theme_classic() +
    geom_violin() + geom_quasirandom(alpha = 0.5, size = 0.5) + geom_boxplot(width=0.2) + ggtitle("P_FPP_D11")_____no_output_____pdf(paste0(fig_dir,"Supp_Fig_6d_FGFR1.pdf"), width=4, height=3.8)
ggplot(df_box, aes(x = as.character(genotype), y = FGFR1)) + xlab(snp) + theme_classic() +
    geom_violin() + geom_quasirandom(alpha = 0.5, size = 0.5) + geom_boxplot(width=0.2) + ggtitle("P_FPP_D11")
dev.off()_____no_output_____
</code>


# Notebook from prashantk016/Predictive-Analysis-for-E-Commerce-Website-and-Product-Recommendation
Path: Part 1 - Data Visualization.ipynb

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from wordcloud import WordCloud, STOPWORDS
%matplotlib inline
import nltk
from io import StringIO
import collections as co
from datetime import datetime
import datetime as dt
import matplotlib.pyplot as plt
_____no_output_____df = pd.read_csv('Replaced.csv',encoding='ISO-8859-1')
df.head()_____no_output_____

#### Total number of ratings_____no_output_____

print('In all, there are ',df['rating'].nunique(),'types of ratings in the dataset: ',df['rating'].unique())In all, there are  5 types of ratings in the dataset:  [5 1 3 4 2]

#### Total number of products_____no_output_____

print('In all, there are ',df['name'].nunique(),'products in the dataset: ',df['name'].unique())In all, there are  600 products in the dataset:  ['Pink Friday: Roman Reloaded Re-Up (w/dvd)'
 'Lundberg Organic Cinnamon Toast Rice Cakes'
 'K-Y Love Sensuality Pleasure Gel' 'J.R. Watkins Hand Cream, Lemon Cream'
 'Ambi Complexion Cleansing Bar'
 "Johnson's Baby Bubble Bath and Wash, 15oz"
 'Olay Regenerist Deep Hydration Regenerating Cream'
 'Windex Original Glass Cleaner Refill 67.6oz (2 Liter)'
 'Heinz Tomato Ketchup, 38oz'
 'Kind Dark Chocolate Chunk Gluten Free Granola Bars - 5 Count'
 'Pantene Color Preserve Volume Shampoo, 25.4oz'
 'Aussie Aussome Volume Shampoo, 13.5 Oz' "Cars Toon: Mater's Tall Tales"
 'CeraVe SA Renewing Cream' 'Solo Foods Almond Paste'
 'Finish Quantum Dishwasher Detergent, Lemon Sparkle Scent, 45 Count'
 'Disney174 Jake And The Neverland Pirates 4 Piece Bedding Set - Toddler'
 'Pearhead Id Bracelet Frame'
 'Craft Punch Giga Scallop Circle 45 24687534 To 334'
 'Neutrogena Wet Skin Sunscreen Spray Broad Spectrum SPF 50, 5oz'
 "Meguiar's Deep Crystal Car Wash 64-Oz."
 'Banana Boat Sunless Summer Color Self Tanning Lotion, Light To Medium'
 'Cetaphil Gentle Skin Cleanser, 2oz'
 'Suave Professionals Hair Conditioner, Sleek'
 'Bumble Bee Solid White Albacore In Water - 5 Oz'
 'Citrus Magic Instant Spot & Stain Remover'
 'La Tortilla Factory Hand Made Style Tortillas Flour'
 "Black Sister's Revenge (dvd)"
 'Sea Gull Lighting Six Light Bath Sconce/vanity - Brushed Nickel'
 'The Seaweed Bath Co. Argan Conditioner, Smoothing Citrus'
 'Way Basics 3-Shelf Eco Narrow Bookcase Storage Shelf, Espresso - Formaldehyde Free - Lifetime Guarantee'
 'Bi-O-kleen Spray & Wipe All Purpose Cleaner'
 'Yes To Carrots Nourishing Body Wash'
 'Alberto VO5 Salon Series Smooth Plus Sleek Shampoo'
 'Dark Shadows (includes Digital Copy) (ultraviolet) (dvdvideo)'
 'Clambake (dvd)' 'Mike Dave Need Wedding Dates (dvd + Digital)'
 'Sea Gull Lighting Ceiling Fan - White'
 'Progresso Traditional Meatball & Rice Soup' "Herr's Baked Cheese Curls"
 'Hawaiian Punch Berry Limeade Blast Juice'
 'Moom Express Pre Waxed Strips For Face & Bikini'
 'My Big Fat Greek Wedding 2 (blu-Ray + Dvd + Digital)' 'King Ralph (dvd)'
 'Holmes174 Personal Indoor Heater W/ Manual Controls White 1500w Hfh131-N'
 'The Script - No Sound Without Silence (cd)'
 'Beanitos Bean Chips, Simply Pinto Bean'
 'Pantene Pro-V Expert Collection Age Defy Conditioner'
 'Greyson Vintage Industrial Occasional Cocktail Coffee Table - Antique Bronze - Baxton Studio'
 "Nature's Path Flax Plus Maple Pecan Crunch Cereal"
 'Lite Source Basic Ii 1-Lt Floor Lamp - Dark Bronze'
 'Sloan Royal Urinal Flush Valve, 1.0 Gpf, Royal 186-1'
 'Sunflower Swag With Metal Frame - Nearly Natural'
 "Toy Story Kids' Woody Accessory Kit"
 'Maranatha No Stir Raw Maple Almond Butter'
 'Chex Muddy Buddies Brownie Supreme Snack Mix'
 'Sopranos:Season 6 Part 1 (blu-Ray)'
 'Tresemme Kertatin Smooth Infusing Conditioning'
 'Wagan Smartac 80watt Inverter With Usb'
 'Creme Of Nature Intensive Conditioning Treatment, 32'
 'Arrid Extra Dry Anti-Perspirant Deodorant Spray Regular'
 'Eagle Fat Free Sweetened Condensed Milk'
 'Pinaud Clubman Styling Gel, Superhold'
 'Wedding Wishes Wedding Guest Book'
 'Diet Canada Dry Ginger Ale - 12pk/12 Fl Oz Cans'
 'Baxter Of California Cream Pomade'
 'Ragu Roasted Garlic Parmesan Pasta Sauce'
 'Sabre 2 Pack Door And Window Alarm'
 'Pendaflex174 Divide It Up File Folder, Multi Section, Letter, Assorted, 12/pack'
 "Newman's Own Organics Licorice Twist, Black 5oz"
 'The Honest Company Laundry Detergent'
 'Plano Mini-Magnum 13-Compartment Tackle Box'
 'Hoover174 Platinum Collection153 Lightweight Bagged Upright Vacuum With Canister - Uh30010com'
 'Stander Pt Bedcane - Bed Handle'
 'Calvin Klein Secret Obsession Eau De Parfum'
 'Wallmount Server Cabinet (450mm, 9 RU)'
 'Happy Tot Apple and Butternut Squash' "Udi's Pepperoni Pizza"
 'Better Built 74010862 Bet74010862 60In Crossover Two Lid, Deep, Truck Tool Box'
 'The Resident Evil Collection 5 Discs (blu-Ray)'
 "Annie's Homegrown Gluten Free Double Chocolate Chip Granola Bars"
 'Super Poligrip Denture Adhesive Cream, Ultra Fresh - 2.4 Oz'
 "Nearly Natural 5.5' Bamboo W/decorative Planter"
 '100:Complete First Season (blu-Ray)'
 'Australian Gold Exotic Blend Lotion, SPF 4'
 'Colorganics Lipstick, Cayenne'
 'Germ Guardian174 Elite 3-In-1 Pet Pure True Hepa Air Purifier Ac4300bptca'
 'Red (special Edition) (dvdvideo)' 'Hormel Chili, No Beans'
 'Tai Pei Sweet & Sour Chicken'
 'Clorox Disinfecting Wipes Value Pack Scented 150 Ct Total'
 'Avery174 Ready Index Contemporary Table Of Contents Divider, 1-8, Multi, Letter'
 "Chips Deluxe Soft 'n Chewy Cookies"
 'WeatherTech 40647 14-15 Outlander Cargo Liners Behind 2nd Row, Black'
 'Orajel Maximum Strength Toothache Pain Relief Liquid'
 "Chester's Cheese Flavored Puffcorn Snacks"
 'D-Con Mice Bait Station - 3ct'
 'Lysol Concentrate Deodorizing Cleaner, Original Scent'
 'Coola Organic Sunscreen Classic Face Cucumber SPF 30'
 "Burt's Bees Lip Shimmer, Raisin" 'SC Johnson One Step No Buff Wax'
 'Simple Green All-Purpose Cleaner, 16oz'
 'Wilton Black Dots Standard Baking Cups'
 "Mrs. Meyer's174 Lemon Verbena Laundry Scent Booster - 18oz"
 'Cuisinart174 Electric Juicer - Stainless Steel Cje-1000'
 'Avery174 11-1/4 X 9-1/4 Index Maker Extra Wide Label Dividers With 5 Tab - Clear (5 Sets Per Pack)'
 'Iman Second To None Stick Foundation, Clay 1'
 'Romantic Drama: Greatest Classic Films Collection 2 Discs'
 'Lundberg Wehani Rice, 25lb' 'Post Bound Jumbo Album - Burgundy (11x14)'
 'Stonyfield Yobaby Peach & Pear Yogurt 4oz 6 Ct'
 'Charcoal Stone Toothbrush Holder Gray'
 'Bounce Dryer Sheets, Fresh Linen, 160 sheets'
 "L'oreal Paris Visible Lift Smooth Absolute, Natural Buff"
 'Just For Men Touch Of Gray Gray Hair Treatment, Black T-55'
 'Roommates No Place Like Home Peel Stick Wall Decals'
 'Pocket Watch Wall Clock Distressed Black - Yosemite Home Decor174'
 'Kraus FVS-1007 Single Hole Vessel Bathroom Faucet from the Ramus Collection'
 'Mill Creek Aloe Vera & Paba Lotion'
 'All,bran Complete Wheat Flakes, 18 Oz.'
 'Clorox Ultimate Care Premium Bleach' 'Kind Nut Delight Bar'
 'Coty Airspun Face Powder, Translucent Extra Coverage'
 "Nature's Path Chunky Chocolate Peanut Chewy Granola Bars"
 'Axe Dry Anti-Perspirant Deodorant Invisible Solid Phoenix'
 'Power Crunch Protein Energy Bar Peanut Butter Creme Original'
 '42 Dual Drop Leaf Table with 2 Madrid Chairs"'
 'Smead174 Recycled Letter Size Manila File Backs W/prong Fasteners, 2 Capacity, 100/box'
 'Nearly Natural Pothos Ledge Plant (set On Foam) Silk Plant'
 'Little Bedding By Nojo Jungle Dreams 2 Pack Sheet Set'
 'Sizzix Framelits Dies 1by Tim Holtz Bird Crazy-Silver Asst Sizes'
 'Vaseline Intensive Care Lip Therapy Cocoa Butter'
 'Tostitos Simply Blue Corn Tortilla Chips'
 'Starbucks153 Doubleshot Protein Coffee - 11 Fl Oz'
 'Bill Glor Gaither - Church In The Wildwood (cd)' 'RC Cola, 12oz'
 "There's Something About Mary (dvd)"
 'Head & Shoulders Dandruff Shampoo Ocean Lift 2 In 1'
 'Scotty Mini Double Ended Extender' 'Elvis Presley - Girl Happy (cd)'
 'Kenroy Home Table Lamp - Chrome'
 'Black Front Loading Frame Set (8.5x11) Set Of 12'
 'Dermalogica Special Cleansing Gel, 8.4oz'
 "L'oreal Paris Colour Caresse Wet Shine Stain, Pink Resistance"
 'Doc Mcstuffins: Friendship Is The Best Medicine'
 'Smead174 3-In-1 Supertab Section Folders, 1/3 Cut Top Tab, Letter, Assorted, 12/pack'
 'Bilbao Nightstand Gray Oak - South Shore'
 "Africa's Best No-Lye Dual Conditioning Relaxer System Super"
 'Tramontina Ceramica 10 Piece Cookware Set - Red'
 "Newman's Own Balsamic Vinaigrette, 16.0oz"
 'Carson-Dellosa Publishing Photographic Learning Cards Boxed Set, Nouns/verbs/adjectives, Grades K-12'
 'Home Health Hairever Shampoo'
 'Lite Source Reiko 1 Light Table Lamp - Orange'
 'Sea Gull Lighting One Light Wall/bath/vanity-Brushed Nickel'
 'J.a. Henckels International 4-Pc Everedge Plus Steak Knife Set'
 'Olay Moisturizing Lotion For Sensitive Skin'
 'Kikkoman Soy Sauce, 5fl oz'
 'Kohler 10280-4 Fort Bath Spout With Sculpted Lift Rod and 1/2-in NPT Connection'
 'Naturtint Nutrideep Multiplier Protective Cream'
 'Gain Original Scent Liquid Fabric Softener 129 Oz'
 "Burt's Bees Lip Shimmer, Watermelon"
 'Pleasant Hearth Diamond Fireplace Screen - Espresso'
 'Scooby Doo And The Loch Ness Monster (blu-Ray)'
 'Cal Lighting Led Dark Bronze Finish Metal Piano Lamp'
 'Lynk Professional174 Pull Out Cutting Board Bakeware Sliding Cabinet Organizer'
 'Trend Lab Park Nursing Cover - Paisley'
 "L'oreal Paris Advanced Hairstyle Boost It High Lift Creation Spray"
 'Plum Organics Just Prunes'
 'Batherapy Natural Mineral Bath Sport Liquid, 16 oz'
 'Candy Pink Plastic Cups, 20 pk'
 "Various - Country's Greatest Gospel:Gold Ed (cd)"
 'JNH Lifestyles Goldstar 3 Person FAR Infrared Sauna'
 'Soothing Touch Lemon Cardamom Vegan Lip Balm .25 Oz'
 '2x Ultra Era with Oxi Booster, 50fl oz'
 'Every Man Jack Pomade Signature Mint Scent'
 'Reebok Classic Leather Running Shoes - White (Men)'
 "Annie's Homegrown Deluxe Elbows & Four Cheese Sauce"
 'Delta Single Handle Shower Faucet'
 'Ogx Conditioner, Hydrating Teatree Mint'
 'Physicians Formula Mineral Wear Talc-Free Mineral Correcting Powder, Creamy Natural'
 'Equals (blu-Ray)' 'Weleda Everon Lip Balm'
 'Fiskars174 Classic Stick Rotary Cutter (45 Mm)'
 'Clorox Disinfecting Bathroom Cleaner'
 'BRIDGESTONE 130/70ZR18M/C(63W)FRONT EXEDRA G851, CRUISER RADL'
 'Metzeler ME888 Marathon Ultra Custom Touring Front Tire 100/90-19'
 "Fantasy Fields Lil' Sports Fan Step Stool - Teamson"
 'Starbucks Iced Expresso Classics Vanilla Latte Coffee Beverage - 40oz'
 'Head & Shoulders Classic Clean Conditioner'
 'Blue Anchor Design Throw Pillow (18x18) - Rizzy Home'
 'Kendall Comforter And Sheet Set (twin) Aqua - 7pc'
 'Tree Hut Shea Body Butters, Coconut Lime, 7 oz'
 'Cococare 100% Natural Castor Oil'
 'Pacific Natural Foods Organic Beef Broth'
 'Honeywell Heatbud Ceramic Heater Black'
 'Jergens Extra Moisturizing Liquid Hand Wash, 7.5oz'
 "Lay's Salt & Vinegar Flavored Potato Chips" 'Noosa Honey Yogurt'
 '0.6 Cu. Ft. Letter A4 Size Waterproof 30 Min. Fire File Chest'
 'If A Man Answers (dvd)'
 'Pleasant Hearth 1,800 sq ft Wood Burning Stove with Blower, Medium, LWS-127201'
 "Stacy's Simply Naked Bagel Chips"
 "Stacy's Garden Veggie Medley Pita Chips"
 'Tostitos Bite Size Tortilla Chips'
 'Nexxus Exxtra Gel Style Creation Sculptor'
 'Hollywood Beauty Olive Cholesterol'
 'Southern Enterprises Archer Fold-Away Home Bar in Walnut'
 'Chips Ahoy! Original Chocolate Chip - Cookies - Family Size 18.2oz'
 '4C Grated Parmesan Cheese 100% Natural 8oz Shaker'
 'Caress Moisturizing Body Bar Natural Silk, 4.75oz'
 'Feit 60-Watt A19 Gu24 Base Led Light Bulb - Soft White' 'Heiress (dvd)'
 'Mia Shower Curtain Green/brown - Lush Decor174'
 'Progresso Traditional Chicken Tuscany Soup'
 'Yes To Grapefruit Rejuvenating Body Wash'
 'Progresso Light Vegetable & Noodle Soup'
 'Maybelline Clean Express! Makeup Removing Lotion'
 'Physicians Formula Powder Palette Mineral Glow Pearls, Translucent Pearl'
 'Pleasant Hearth 7.5 Steel Grate, 30 5 Bar - Black' 'Switchmas (dvd)'
 'Vaseline Intensive Care Healthy Hands Stronger Nails'
 'Solo Foods Poppy Seed Cake and Pastry Filling' 'Alex Cross (dvdvideo)'
 'Clear Scalp & Hair Therapy Total Care Nourishing Shampoo'
 'Progresso Traditional Chicken Rice With Vegetables Soup'
 "Cheetos Crunchy Flamin' Hot Cheese Flavored Snacks"
 'Bisquick Original Pancake And Baking Mix - 40oz'
 'Olivella Bar Soap - 3.52 Oz'
 'Godzilla 3d Includes Digital Copy Ultraviolet 3d/2d Blu-Ray/dvd'
 'Voortman Sugar Free Fudge Chocolate Chip Cookies'
 'Finish Gelpacs Dishwasher Detergent, Orange Scent, 84ct'
 'Tim Holtz Retractable Craft Pick-Red 6x.5'
 'Ragu Traditional Pasta Sauce'
 "Stargate (ws) (ultimate Edition) (director's Cut) (dvdvideo)"
 'Iman Luxury Moisturizing Lipstick, Black Brandy 006'
 'Aveeno Baby Continuous Protection Lotion Sunscreen with Broad Spectrum SPF 55, 4oz'
 '5302050 15/16 FCT/HOSE ADAPTOR'
 "Ben & Jerry's Coffee, Coffee Buzzbuzzbuzz! Ice Cream, Pint"
 'Jolly Time Select Premium Yellow Pop Corn'
 'Leslie Sansone:Belly Blasting Walk (dvd)'
 'Boraam Sonoma Kitchen Cart With Wire Brush Gray - Maaya Home'
 "Jason Aldean - They Don't Know"
 'Ogx Anti-breakage Keratin Oil 3 Minute Miraculous Recovery'
 "Meguiar's Ultimate Quik Detailer 22-Oz."
 'Care Free Curl Gold Instant Activator' 'Spam Single Classic'
 'Smead174 2 1/4 Inch Accordion Expansion Wallet, Poly, Letter, Translucent Green'
 'Cantu Coconut Milk Shine Hold Mist - 8oz'
 'Vicks Vaporub, Regular, 3.53oz'
 'Planes: Fire Rescue (2 Discs) (includes Digital Copy) (blu-Ray/dvd)'
 'Various Artists - Choo Choo Soul (cd)' 'High-Dome Floor Door Stop'
 'Shea Moisture Mango & Carrot Kids Extra-Nourishing Conditioner, 8fl Oz'
 'Ceiling Fan With Light White 14.2 X 29.9 X 9.2 - Hunter Fan'
 'Concept Housewares 36 Natural Wood ceiling mounted pot rack'
 'Tostitos Original Restaurant Style Tortilla Chips'
 'Walkers Stem Ginger Shortbread' 'Barielle Nail Rebuilding Protein'
 'Musselman Apple Sauce, Cinnamon, 48oz'
 'Storkcraft Tuscany Glider and Ottoman, Beige Cushions, Espresso Finish'
 'Queen Helene Cocoa Butter Solid'
 'Bodycology Nourishing Body Cream, Pretty In Paris'
 'Sea Gull Lighting Holman One Light Wall/bath Sconce - Brushed Nickel'
 'Chobani174 Strawberry On The Bottom Non-Fat Greek Yogurt - 5.3oz'
 'Meguiars Interior Detailer Wipes 25ct'
 'Bedtime Originals Pinkie Musical Mobile'
 'Various - Red Hot Blue:Tribute To Cole Porter (cd)'
 "L'oreal Paris Advanced Hairstyle TXT IT Hyper-Fix Putty"
 '2017-2018 Brownline174 Duraflex 14-Month Planner 8 1/2 X 11 Black'
 "Mrs. Meyer's Lemon Verbena Surface Scrub"
 "L'or233al Paris Elvive Extraordinary Clay Rebalancing Conditioner - 12.6 Fl Oz"
 'Just For Men Shampoo In Hair Color, Light-Medium Brown 30'
 'Sunbrella174 Spectrum Outdoor 2-Piece Square Throw Pillow Set - Blue'
 'Kidz Bop - Kidz Bop 26 (cd)'
 'Portman Coffee Table - International Concepts'
 'Mitchum Men Clinical Anti-perspirant & Deodorant Soft Solid, Unscented'
 'Gone Fishing Titanized Fisherman Pliers with Braid Cutter'
 'Mitchum For Women Power Gel Antiperspirant & Deodorant, Shower Fresh'
 'Nearly Natural Rose Arrangement With Vase'
 'Queen Helene Refreshing Mint Julep Natural Facial Scrub, 6 oz'
 'Just For Men Brush-In Color Gel For Mustache & Beard, Dark Brown M-45'
 'Ecotrin Pain Reliever Regular Strength 325mg Tablets - Aspirin (nsaid) - 300ct'
 'Head & Shoulders Dry Scalp Care Conditioner' 'Obagi Pore Therapy'
 'Teenage Mutant Ninja Turtles Iii (dvdvideo)'
 'Milani Color Statement Lipstick, 08 Ruby Valentine'
 'Warhammer: The End Times Vermintide Playstation 4'
 'Interdesign Classico Wall Mount Paper Towel Holder - Chrome (14)'
 'One Grace Place Terrific Tie Dye Throw Pillow Car (13x9x3)'
 'Crystal Key Table Lamp - Safavieh174'
 "Michael Jackson's Vision Deluxe Vision 3 Discs"
 'Oxiclean Laundry Stain Remover Spray'
 'Nesco 6 Qt. Roaster Oven - Stainless Steel'
 'Swingline174 Stapler Value Pack - Black'
 "L'oreal Paris Voluminous Extra-Volume Collagen Mascara, Black Brown"
 'Hubba Bubba Bubble Tape - 2pk' 'Guitar, Keyboard, Drum Throne'
 'Blast Away 10lbs (dvd)'
 "Newman's Own Beef & Broccoli Complete Skillet Meal"
 'Isoplus Neutralizing Shampoo'
 'Progresso Vegetable Classics 99% Fat Free Lentil Soup'
 'Kid Rock - Cocky Explicit Lyrics (cd)'
 'Sally Hansen Hard As Nails Hard As Wraps Nail Harderner'
 'Working Girl (dvd)' 'Australian Gold Lotion SPF 50 Baby'
 'Swann Door Alarm - White (swads-Alarmk-Gl)'
 'Ust 30-Day Duro Lantern, Titanium' 'Latourangelle Coconut Oil - 14oz'
 'Caribou Coffee174 Lacuna Dark Roast Ground Coffee - 12oz'
 'Attitude Natural Air Purifier, Eucalyptus & Lavender'
 'The Jungle Book (blu-Ray/dvd + Digital)'
 'Baby Banana Brush Sharky Brush'
 'Schwarzkopf Gliss153 Hair Repair153 Color Guard153 Express Repair153 Conditioner For Colored Or Highlighted Hair - 6.8oz'
 'No-Ad Sport Continuous Spray Sunblock, SPF 30'
 'Cheez-It Mozzarella Crackers, 13.7oz'
 'Northwest Black Glass Panel Electric Fireplace Wall Mount Remote'
 'Kenroy Home Table Lamp - Teal'
 'Sally Hansen Insta-Dri Nail Color, 05 Mauve It'
 'Smooth Shine Argan Power Gel - 16 Oz'
 'Maybelline Eye Studio Color Plush Shadow Quad, Gutsy Green'
 'Rolling Stones - Let It Bleed (cd)'
 'Black Radiance Artisan Color Baked Blush, Warm Berry'
 'Clearly Natural Glycerin Bar Soap, Green Apple'
 'American Crew Tea Tree Calming Conditioner'
 'Hugo Naturals Volumizing Shampoo (Vanilla & Sweet Orange)'
 'Simply Ruffles Sea Salted Reduced Fat* Potato Chips - 8oz'
 'Haagen-Dazs Gelato, Sea Salt Caramel'
 'Dermalogica Environmental Control Deodorant'
 'Mission Super Size White Corn Tortillas, 10 Ct'
 'Olly Endless Energy Zinger Vitamin Gummies - Lemon - 30ct'
 'Cream of Wheat Original 2 1/2 Minute, 28 Oz'
 'Stridex Conditioning Acne Scrub'
 'Vornado - 3-Speed Sr. Vintage Whole Room Air Circulator - Chrome'
 'J.R. Watkins Body Oil Mist, Coconut Milk & Honey'
 'Nivea Men Q10 Shaving Gel, Revitalizing'
 'Fiber One Oats Peanut Butter Chewy Bars - 5ct'
 'Lean Cuisine Culinary Collection Meatloaf With Mashed Potatoes'
 'Cerave Healing Ointment - 5 Oz' 'Ore International Table Lamp - Silver'
 'Herbatint 9dr Copperish Gold' "Chuggington: Let's Ride The Rails"
 'Pulp Fiction (dvdvideo)' 'Albert King - Very Best Of Albert King (cd)'
 '2x2 Advantage Glideaway Deluxe 4-Bike Carrier - Black'
 "Annie's Homegrown White Cheddar Microwavable Macaroni & Cheese"
 '99179 - Fit System 01-05 Civic Replacement Mirror Glass, Driver Side - check description for fitment details'
 'John Frieda Brilliant Brunette Colour Protecting Moisturising Conditioner, 20oz'
 'Petmaker 28 Sisal Burlap Cat Scratching Post'
 'Hawaiian Punch Orange Ocean Juice'
 "Children's Benadryl174 Allergy Relief Dye-Free Bubble Gum Flavored Liquid - Diphenhydramine Hcl - 4oz"
 'Murray Sugar Free Chocolate Chip Cookies'
 'Anti Monkey Butt Anti Friction Powder With Calamine, Original'
 'Suave Kids Berry Body Wash'
 'Sobe Lifewater Strawberry Dragonfruit - 0 Cal'
 'Smart Start Strong Heart Antioxidants Cereal, 17.5 Oz.'
 'NYX Doll Eye Mascara, Waterproof - Black'
 'Curel Ultra Healing Intensive Lotion, 2.5oz'
 "Snyder's Of Hanover Chocolate Covered Pretzels Dark Chocolate Mini Dips"
 'Caldrea Sea Salt Neroli Laundry Detergent' 'Chris Botti - Italia (cd)'
 'Trend Year Around Calendar Bulletin Board Set, 22 X 17'
 "Tom's of Maine Fluoride-Free Propolis & Myrrh Toothpaste, Spearmint"
 'DKB HOUSEHOLD USA/ZYLISS 20262 Lock/Lift Can Opener'
 'Pink Floral Print Rosalie Ruffled Throw Pillow Cover (16x16) 2 Piece - Simply Shabby Chic153'
 'Roommates Laundry Quote Peel And Stick Wall Decals'
 'Klondike Choco Tacos Original'
 'Onika Square Accent Table - Black/silver - Safavieh174'
 'Warner Bros Romance Classics Collecti (dvd)'
 'Mario Badescu Glycolic Foaming Cleanser'
 'Air Wick Life Scents Paradise Retreat Air Freshener Spray - 6.17oz'
 'Softsoap Moisturizing Liquid Hand Soap, Milk Protien and Honey'
 'Tide Pods Detergent, Botanical Rain, 61ct'
 'Almay Eyeliner Pencil, Brown 207'
 'Almay Intense I-Color Liner, Black Pearl'
 'Lean Cuisine Culinary Collection Steak Tips Portabello'
 'Vornado - 99-Speed 5303dc Energy Smart Small Air Circulator With Remote Control - White'
 'Natralia Anti-fungal Liquid'
 "Physician's Formula Cheek Palette Cream-to-Powder Blush Rose Palette"
 "One Grace Place Teyo's Tires Round Rug - Black (5x5')"
 'Lysol Disinfectant Spray, Early Morning Breeze, 19.0 Ounces'
 'The Secret Life Of Pets (4k/uhd + Blu-Ray + Digital)'
 'Quilted Northern Ultra Plush Toilet Paper - 18 Mega Rolls'
 'Third Man On The Mountain (dvd)'
 'Legally Blonde (special Edition) (dvdvideo)'
 'Porcelana Eye Dark Circle Treatment'
 'Nivea Extended Moisture Body Lotion, 16.9fl Oz (500ml)'
 'Honeybee Gardens Jobacolors Lip Liner, Charisma'
 "L'oreal Paris Advanced Haircare, Color Vibrancy Nourishing Conditioner 12.6oz"
 "Suzie's Un-salted Puffed Thin Cakes" 'Keri Shea Butter Body Lotion'
 'Maybelline Instant Age Rewind Eraser Dark Circles Treatment Concealer, Fair'
 'Jerdon 5x Led Lighted Rectangular Wall Mounted Mirror Extends 15.5'
 'City Mini Zip - Single Car Seat Adapter For Baby Jogger City Go And Graco Click Connect'
 'Lite Source Quatro 2 Light Table Lamp - Brushed Dark Bronze - Pack Of 2'
 "Cuisinart174 Chef's Classic Stainless Steel 10 Piece Cookware Set - 77-10"
 'Lumisource Touch Bendable Emu Table Lamp - White'
 'Kenroy Home Table Lamp - Antique Brass'
 'Fabric Expressions Wedding Photo Album - White (8.5x8.5)'
 'Pioneer 3 - Ring Fabric Album - Black' 'P2 (dvdvideo)'
 'Rihana Floor Lamp - Safavieh174'
 'Shea Moisture African Black Soap Problem Skin Facial Mask'
 'Lean Cuisine Culinary Collection Sweet and Sour Chicken'
 "L'oreal Paris Advanced Haircare, Triple Resist Reinforcing Conditioner 25.4oz"
 'The Foodsaver174 10 Cup Fresh Container - Fac10-000'
 "Burt's Bees Lip Shimmer, Cocoa" 'Band Of Angels (dvd)'
 'Ge174 Led 65-Watt Br30 Light Bulb Soft White 2pk'
 'Isoplus Oil Sheen Hair Spray'
 'Scunci 2mm No Damage Braided Elastics - 6pk'
 'Palladio Rice Paper, Translucent'
 'E.l.f. Essential Lip Stain, Pink Petal' 'Shenandoah (dvd)'
 'Oxy Maximum Action Advanced Face Wash' 'Chi Shine Infusion'
 'Sanrio - Projectables Led Night Light - Plug In - Light Sensing - Sanrio - Hello Kitty - Pink'
 'Bumble Bee Prime Fillet Solid Light Tuna - Tonno In Olive Oil - 5 Oz'
 'Panic! At The Disco - Pretty. Odd. (cd)'
 'Bengay Cold Therapy Menthol Pain Relieving Gel - 4 Oz'
 'Neutrogena Rapid Tone Repair Dark Spot Corrector'
 'The Twilight Saga: Twilight/new Moon/eclipse Extended Editions'
 'Maybelline Color Sensational Lipcolor, Pinkalicious'
 "Hard Day's Night (blu-Ray)" 'Long Riders (dvd)'
 'NFL Green Bay Packers Embroidered Car Mats'
 'Hagerty Jewelry Wipes (20 Wet Disposable Wipes)'
 'Tide Original Liquid Laundry Detergent - 100 Oz'
 'Wet N Wild Color Icon Glitter Single, Distortion'
 'Cinnamon Toast Crunch' 'Rv (ws) (dvdvideo)'
 'Sinful Colors Professional Nail Enamel, Cream Pink'
 'Bestway Rip Tide SUP, 10\' x 30 x 4""'
 'Austin Powers:Spy Who Shagged Me (blu-Ray)'
 'Healthy Skoop Organic Protein Powder - Chocolate - 15.9oz'
 'Nourish Organic Clean & Fresh Organic Deodorant, Fresh Fig'
 'Yardley Of London Bath and Shower Gel, Exfoliating Sea Minerals'
 'Star Trek:Original Series Season One (dvd)'
 'The Honest Company Bar Soap, Lavender'
 'Black Opal Total Coverage Spot & Scar Eraser, Hazelnut'
 'Lite Source Enkel 1 Light Table Lamp - Dark Walnut'
 'Pantene Airspray Hairspray - 7 Oz'
 "Burt's Bees Ultimate Care Hand Cream"
 "L'oreal Paris Evercurl Silk and Gloss Dual Oil Care"
 'Eggo Blueberry Cobbler Waffle 11.6 Oz'
 "Nature's Path Honey Oat Crunch Flax Plus Granola Bars"
 'Colorganics Lipstick, Ginger'
 'Miranda Lambert - The Weight Of These Wings'
 'Ocean Potion Ever Glow Xtreme Self Tanning Lotion'
 'The Fourth Kind (dvdvideo)'
 'Essex Pendulum Wall Clock Black - Timekeeper174'
 'Adesso Oslo Floor Lamp - White'
 'Progresso Panko Italian Style Bread Crumbs'
 'Covergirl Advanced Radiance Age-Defying Pressed Powder, Classic Beige 115'
 "Pirate's Booty Original Tings Crunchy Corn Sticks"
 'Maybelline Eye Studio Master Duo Glossy Liquid Liner, Black Lacquer'
 'Olay Total Effects Daily Moisturizer, 7-In-1 Anti-Aging, 0.5oz'
 "Lucy's Sugar Cookies, 5.5oz" 'Planters Peanuts, Dry Roasted, 16oz'
 'Silver Linings Playbook (dvd)'
 'Wild Planet Wild Albacore Tuna - No Salt Added'
 'Teenage Mutant Ninja Turtles174 Sheet Set - Pink (twin)'
 'Hormel Sliced Roasted Turkey Breast & Gravy'
 'Early California Black Ripe Olives Medium Pitted'
 'Arthur/arthur 2:On The Rocks (blu-Ray)'
 'Pantene Ice Shine Shampoo, 12.6 oz'
 'Black Gold 90th Birthday Mylar Balloon'
 'Nyx Pump It Up Lip Plumper, Liv' 'Scunci No Slip Luxe Headwrap'
 'Rubbermaid174 Reveal Spray Mop'
 'Jerdon Led Lighted Makeup Mirror White Includes 10x Adjustable Spot Mirror White'
 "Jack Link's Teriyaki Beef Stick"
 'Bicycle Shower Curtain (72x72) Blue/cream'
 'Dremel VC490 Velocity Universal Panel Cutting Blade'
 'Horizon174 Organic Unsalted Butter - 1lbs'
 "L'oreal Paris Revitalift Triple Power Deep-Acting Moisturizer"
 'Krusteaz Gluten Free Cornbread Mix And Muffin Mix - 15oz'
 "Mrs. Meyer's Lavender Toilet Bowl Cleaner"
 'Neato Botvacside Brush - 2 Pack'
 'Smead174 Hanging File Folders, 1/5 Tab, 11 Point Stock, Letter, Navy, 25/box'
 'American Crew Classic Grooming Spray'
 'Mineral Fusion Eye Shadow Trios, Fragile'
 'Conair Flexible Rollers Spiral Curls - 18 Count'
 'Who Is Harry Nilsson (and Why Is Ever (dvd)'
 'Wish-Bone Greek Vinaigrette Salad Dressing'
 'Suave Naturals Refreshing Body Wash, Ocean Breeze'
 'Hormel Black Label Bacon, Original' 'The Laundress Delicate Wash, 16 oz'
 "Rudolph And Frosty's Christmas In Jul (dvd)"
 'Arched Petrizzi Decorative Wall Mirror Silver - Uttermost'
 'The Whole Nine Yards/the Whole Ten Yards (dvdvideo)'
 'Peak Long Life Antifreeze Coolant 1-Gal.'
 'Maybelline Eye Studio Master Duo Glossy Liquid Liner, Polished Green'
 'J. Hunt Bold Table Lamp'
 'Bosch 3912/B3915/3915 Miter Saw Replacement Dust Bag # 2610911939'
 'Sebastian Halo Mist UV Filter Weightless Shine Spray'
 'Mars Chocolate Caramel Lovers Variety Mix - 37.7oz'
 'Klondike Bars Caramel Pretzel'
 'Reynolds174 Bakeware Pans Non-Stick With Lids - 3ct'
 'TRS7301B Trumpet Stand'
 'Rubbermaid Lock-Its Food Storage Container, 3 Cup'
 'Kind Maple Glazed Pecan & Sea Salt'
 'Nexxus Promend Heat Protexx Heat Protection Styling Spray'
 'Sonnar T* E 24mm f/1.8 ZA Lens with Circular Polarizer Filter Kit'
 'Cetaphil Intensive Moisturizing Cream - 3 Oz'
 'International Delight Hazelnut Creamer, 24ct singles'
 'Juice Beauty SPF 30 Sport Moisturizer'
 'Meet The Fockers (ws) (dvdvideo)'
 'Shea Moisture Raw Shea Butter Chamomile & Argan Oil Baby Eczema Therapy'
 'NYX Super Skinny Eye Marker, Carbon Black'
 'Honey Bunches Of Oats Honey Roasted, 14.5 Oz.'
 'Aveeno Stress Relief Moisturizing Lotion, 12oz'
 'Starbucks174 Colombian Ground Coffee 12oz'
 'Lundberg Long Grain Brown Organic Rice, 16oz'
 'Ortega Thick & Chunky Mild Salsa' 'Creepshow (blu-Ray)'
 'Aveeno Positively Nourishing Purifying Body Wash, 16oz'
 'The Honest Company Stain Remover'
 'Ge Led 60watt Outdoor Post Light Bulb - Soft White'
 '2x Ultra Era With Oxi Booster, 100fl Oz'
 'Lite Source Reiko 1 Light Table Lamp - Black'
 'Physicians Formula Mineral Wear Talc-Free Mineral Loose Powder, Buff Beige'
 'Suncoat Natural Nail Polish Remover, 60ml'
 'Maple Grove Farms Of Vermont Fat Free Dressing, Cranberry Balsamic'
 '5ct Lumabase Metallic Silver Round Paper Lanterns 10'
 'Ore International Table Lamp - Brown'
 "L'oreal Paris Advanced Hairstyle Lock It Weather Control Hairspray"
 'Keebler Soft Batch Chocolate Chip Cookies'
 'bareMinerals Original Foundation Broad Spectrum Spf 15, Medium'
 'Body Fantasies Signature Fresh White Musk 7oz Fragrance Moisturizing Lotion'
 'Hugo Naturals Medium Hold Styling Gel'
 'Smead174 File Folders, Straight Cut, Reinforced Top Tab, Letter, Green, 100/box'
 'Imagine Foods Organic Low Sodium Free Range Chicken Broth'
 'Orajel Severe P.M. Toothache Pain Relief Cream'
 'Oralbalance Mouth Moisturizing Gel'
 'Attitude Stain Remover, Citrus Zest'
 'Tillamook Yogurt, Key Lime Lowfat Yogurt'
 'Soft Scrub Gel With Bleach Cleanser' 'Mask/son Of The Mask (dvd)'
 'Hidden Valley Gluten Free Honey Bbq Ranch Salad Dressing - 16oz'
 'NYX Slim Lip Pencil, Cabaret' 'Lundberg Black Japonica Rice, 1lb'
 'Black Front Loading Frame Set (4x6) Set Of 12'
 'Season Seafood Sardine Fillets In Sweet & Tangy Sauce'
 'Aveeno Anti-Itch Concentrated Lotion, 4oz'
 'Wet N Wild Megalast Lip Color, Dollhouse Pink 967'
 'Roger Corman Sci Fi Classics (dvd)'
 'Just For Men Autostop Foolproof Hair, Medium-dark Brown A-40, Color'
 'Wheat Thins Crackers, Big'
 "Summer's Eve Feminine Cleansing Cloths, Simply Sensitive, 32 Ea"
 'Level U Pro Active Noise-Canceling In-Ear Headphones (White)'
 "Africa's Best No-Lye Dual Conditioning Relaxer System, Regular"
 'Colorvue Expanding File Pocket Super Tab 13 Pocket Letter Black'
 'Milani Baked Powder Blush, Dolce Pink 01'
 'Cupcake Wall Clock Green/pink - Trend Lab174'
 '16ct Peppa Pig Lunch Napkins' "Mrs. Meyer's Sunflower Hand Soap"
 'Organic Root Stimulator Tea Tree Oil Anti-Bump Lotion'
 'Sanford Glass Beverage Dispenser - Clear' 'Guarding Tess (dvd)'
 'Neutrogena Crease Proof Eye Shadow, Lasting Taupe'
 'Natural Valley153 Peanut Butter Biscuits - 6.75oz'
 'Nordic Ware 3D Pumpkin Duet Pan' 'Biore Blemish Fighting Ice Cleanser'
 'Idahoan Baby Reds with Roasted Garlic and Parmesan Flavored Mashed Potatoes'
 'Ogx Conditioner, Sunkissed Blonde Lemon Highlights'
 "Stauffer's Animal Crackers Chocolate Graham, 14.5oz"
 'Milani Color Statement Lipstick, 26 Nude Creme'
 'Badger Unscented Healing Balm'
 'Lemi Shine Dishwasher Detergent Booster -24 Oz'
 'Metal Table Lamp - Antique Brass (29)'
 "Mrs. Smith's Original Flaky Crust Cherry Pie"
 'Suave Anti-Perspirant Deodorant Invisible Solid Powder'
 "Amy's174 Bowls Mushroom Risotto Gluten Free - 9.5oz"
 'Naruto:Movie:Ninja Clash In The Land (dvd)'
 'Maybelline Great Lash Lots Of Lashes Washable Mascara, Very Black'
 'Independence Day Resurgence (4k/uhd + Blu-Ray + Digital)'
 'Dauphine Traditional French Accent Coffee Table - Baxton Studio'
 'Softsoap Body Butter Scrub Coconut and Jojoba Butter Body Wash'
 'The Honest Company Bathroom Cleaner'
 'Nivea Lip Care A Kiss Of Milk & Honey'
 'Alera174 Genaro Series Guest Chair, Black Leather, Sled Base'
 'Sausage Party (4k/uhd + Digital)'
 'Physicians Formula Powder Palette Mineral Glow Pearls, Bronze Pearl'
 '12110209 - Honeywell Quietset 8-Speed Tower Fan Oscillating'
 'Ceramic Table Lamp - 26.5h - Navy Blue/beige'
 'Swingline174 Classic Full Strip Stapler, 20 Sheet Capacity - Gray'
 'Mill Creek Elastin Cream' 'Attwood 3/8 Primer Bulb"'
 'Cosmo Geometric 15pc Bath Set Blue - Chesapeake Merch Inc.174'
 'Hex Performance Free + Clear Advanced Laundry Detergent - 35 Loads'
 'Monster Trucks (blu-Ray + Dvd + Digital)'
 'Nutrigrain Cereal Bars, Mixed Berry, 8 Ct.'
 'Sony Wireless In-Ear Headphone - Black'
 'Karaoke Usa Professional Dvd/cdg/mp3g Karaoke Player With 7 Color Tft Display, Record, Bluetooth And Tote Wheels'
 'Storks (blu-Ray)' 'Skittles Original Candy Bag - 9oz'
 'Kiss174 Everlasting French Nails-String Of Pearls'
 'Opti-Free Puremoist Disinfecting Solution 10fl Oz'
 'Bebe Au Lait174 Premium Muslin Nursing Scarf - Nightingale'
 'Justin Bieber - Under The Mistletoe (vinyl)']

***How rating is distributed***_____no_output_____

plt.figure(figsize=(12,8))
df.rating.value_counts().plot(kind='pie',autopct='%1.1f%%')
plt.title('Number of appearances in dataset')
plt.show()_____no_output_____

**Year-wise Distribution of reviews**_____no_output_____

df['reviewsdate'] = pd.to_datetime(df['reviewsdate'], errors='coerce')_____no_output_____df['reviewsdate']=df.reviewsdate.dt.year
df[:9]_____no_output_____def lineplot(x_data, y_data, x_label="", y_label="", title=""):
    # Create the plot object
    _, ax = plt.subplots()

    # Plot the best fit line, set the linewidth (lw), color and
    # transparency (alpha) of the line
    ax.plot(x_data, y_data, lw = 2, color = '#539caf', alpha = 1)

    # Label the axes and provide a title
    ax.set_title(title)
    ax.set_xlabel(x_label)
    ax.set_ylabel(y_label)_____no_output_____print('The Ratings along with their occurence in every year:')
df.groupby((['reviewsdate','rating'])).size()The Ratings along with their occurence in every year:
print("The Year-wise distribution of products")
year_no_of_shows=df["reviewsdate"].value_counts().sort_values(ascending=False)
plt.figure(figsize=(12,4))
year_no_of_shows.plot(title='Years with the number of products sold',kind="bar")The Year-wise distribution of products

***Review Level***_____no_output_____

df1=df[df['title'].notnull()]_____no_output_____

#### Remvoing rows with no values_____no_output_____

string=StringIO()
df1['title'].apply(lambda x: string.write(x))
x=string.getvalue()
string.close()
x=x.lower()
x=x.split()_____no_output_____nltk.download('words')
nltk.download('stopwords')[nltk_data] Downloading package words to
[nltk_data]     C:\Users\RIO\AppData\Roaming\nltk_data...
[nltk_data]   Package words is already up-to-date!
[nltk_data] Downloading package stopwords to
[nltk_data]     C:\Users\RIO\AppData\Roaming\nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
words = co.Counter(nltk.corpus.words.words())
stopWords =co.Counter( nltk.corpus.stopwords.words() )
x=[i for i in x if i in words and i not in stopWords]
string=" ".join(x)
c = co.Counter(x)_____no_output_____

***Most Common Words in reviews***_____no_output_____

most_common_10=c.most_common(10)
print('The 10 Most Common Words in reviews are: ')
most_common_10The 10 Most Common Words in reviews are:

**Popular Products**_____no_output_____

wordcloud1 = WordCloud(
                          background_color='black',
                          width=8000,
                          height=5000,
                          relative_scaling = 1.0
                         ).generate(" ".join(df['name']))
plt.imshow(wordcloud1)
plt.axis('off')
plt.show()_____no_output_____