Skip to content

Commit

Permalink
havugimana MMC ppi, starting to rearrange data files
Browse files Browse the repository at this point in the history
  • Loading branch information
patflick committed Oct 23, 2013
1 parent f8b01cb commit a7adb22
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
28 changes: 28 additions & 0 deletions src/pappi/ppis/havu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# import the module for the super-class PPI
from .ppi import PPI


class Havugimana(PPI):
"""
The PPI network from the Havugimana paper:
A census of human soluble protein complexes
http:https://www.ncbi.nlm.nih.gov/pubmed/22939629
"""

def __init__(self, filename, sql_connection):
"""
Creates a new PPI network, with the given filename and sql
connection object.
Parameter:
- filename: Filename of the ppi network file.
- sql_connection: SQL connection object for the database,
into which the PPI network is to be
imported.
"""
# create super class with all necessary paramenters
PPI.__init__(self, filename, sql_connection, "havu",
"Gene1", "Gene2", "uniprot")

self.has_header = True
self.file_field_seperator = '\t'
16 changes: 12 additions & 4 deletions src/test_mapping.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import pappi.id_mapping
import pappi.sql
#import pappi.ppi_import
from pappi.ppi.ccsb import CCSB
from pappi.ppi.bossi_lehner import Bossi_Lehner
#import pappi.ppis_import
from pappi.ppis.ccsb import CCSB
from pappi.ppis.bossi_lehner import Bossi_Lehner
from pappi.ppis.havu import Havugimana
import os

DATA_FOLDER = '/home/patrick/dev/bio/data/'
INT_DATA_FOLDER = '/home/patrick/dev/bio/pappi/data/'

HGNC_FILE = DATA_FOLDER + 'hgnc_entrez_ensembl_uniprot.txt'
BIOMART_FILE = DATA_FOLDER + 'mart_export.csv'
DATABASE = DATA_FOLDER + 'test_matching.sqlite'
CCSB_FILE = DATA_FOLDER + 'HI_2012_PRE.tsv'
BOSSI_FILE = DATA_FOLDER + 'CRG.integrated.human.interactome.txt'

HAVU_FILE = INT_DATA_FOLDER + 'cell_havugimana_ppi.tsv'


# first delete an old DB, to make sure everything is new
if (os.path.exists(DATABASE)):
os.remove(DATABASE)
Expand All @@ -30,7 +35,7 @@

#ccsb_file = open(CCSB_FILE)
#print("Importing CCSB data ...")
#pappi.ppi_import.import_ccsb_file(ccsb_file, con, 'ccsb')
#pappi.ppis_import.import_ccsb_file(ccsb_file, con, 'ccsb')

#pappi.id_mapping.map_identifier('ccsb', ['Gene_IDA', 'Gene_IDB'], 'entrez',
# 'ccsb_hgnc1', 'hgnc', con, True)
Expand All @@ -42,3 +47,6 @@
bossi_ppi = Bossi_Lehner(BOSSI_FILE, con)
#bossi_ppi.import_raw_file()
bossi_ppi.init_ppi(True)

havu_ppi = Havugimana(HAVU_FILE, con)
havu_ppi.init_ppi(True)

0 comments on commit a7adb22

Please sign in to comment.