This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calculate_on_target(barcodes, barcode_map, expected): | |
figsize(4,4) | |
total = 0 | |
on_target = 0 | |
off_target = 0 | |
no_target = 0 | |
expected_counts = [] | |
off_target_counts = [] | |
expected_names = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import groupby | |
lst = ['DEAA IP', | |
'DEAA Input', | |
'FLAG IP', | |
'FLAG Input', | |
'K498A IP', | |
'K498A Input', | |
'Wild Type IP', | |
'Wild Type Input'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cisbp_db = pd.read_csv("/nas3/gpratt/projects/cisbp/analysis/RBP_Information.txt", sep="\t") | |
public_clip_list = pd.read_csv("/nas3/gpratt/projects/public_clip/v1/public_clip_list.csv", index_col=0) | |
public_clip_list= public_clip_list[public_clip_list['CLIP-seq?'] == "Yes"] | |
public_clip_list['ensembl'] = public_clip_list.Ensemblid.astype(str).apply(lambda x: x.split(".")[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analysis_dir = "/nas3/gpratt/projects/public_clip/analysis/v5" | |
experiment_mapping = { | |
"peaks" : "clipper", | |
"ripseeker" : "ripseeker", | |
"pyicoclip" : "pyicoclip", | |
"piranha" : "piranha", | |
"bed_notrim_ingenes_clusters_hg1950" : "kasey", | |
"bed_notrim_ingenes_clusters_mm950" : "kasey", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""" | |
barcode_collapse.py read in a .bam file where the | |
first 9 nt of the read name | |
are the barcode and merge reads mapped to the same position that have the same barcode | |
""" | |
from collections import Counter, OrderedDict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cisbp_db = pd.read_csv("/nas3/gpratt/projects/cisbp/analysis/RBP_Information.txt", sep="\t") | |
pwm_locations = "/nas3/gpratt/projects/cisbp/analysis/pwm_locations/" | |
#where %s is the motif id found in cisbp_db | |
motif_ids = "%s.txt/fimo_reformated.txt" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import pandas as pd | |
datasets = glob.glob("/nas/nas0/gpratt/projects/upf1/analysis/v3/*.RPKM") | |
datasets = {os.path.basename(dataset).split(".")[0] : pd.read_csv(dataset, index_col=0, sep="\t").RPKM for dataset in datasets} | |
clipseq_rpkm_df = pd.concat(datasets, join="outer") | |
clip_count_df.unstack() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from clipper.src import CLIP_analysis | |
import os | |
viz = CLIP_analysis_display.ClipVisualization() | |
def plot_denovo_motifs(bedtool, fig=None): | |
root = "/Users/gpratt/bioinformatics/yeolab/iPython_Notebook/fox2/" | |
out_dir = os.path.join(root, "assigned/") | |
fasta_dir = os.path.join(root, "fasta/") | |
cluster_name = os.path.basename(bedtool.fn) |
OlderNewer