Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d61e837
reimplementation of kinfin cli
DRL May 18, 2026
dfb0365
changed gitignores
DRL May 18, 2026
f1518ff
get_df_nodes
DRL May 18, 2026
80ddf40
get_tree
DRL May 18, 2026
58ac3a3
get_df_nodes
DRL May 18, 2026
fd9f9ee
get_tree
DRL May 18, 2026
b75e88d
comments
DRL May 18, 2026
b4bfa61
contrast()
DRL May 19, 2026
53123fd
Update args.py
DRL May 19, 2026
18ce8f1
changes to CLI args
DRL May 20, 2026
eb74ac9
contrast()
DRL May 20, 2026
1ec8c13
get_df_interpro
DRL May 20, 2026
570d650
preparation for new interpro parser
DRL May 20, 2026
55b2ad8
added readme in docs
DRL May 20, 2026
f2dfb66
linting
DRL May 21, 2026
dc03787
added plot module
DRL May 26, 2026
bb165ee
Update definitions.py
DRL May 26, 2026
9fa5736
Update utils.py
DRL May 26, 2026
e5f0bf6
general refactoring
DRL May 26, 2026
ee6b648
bugfix
DRL May 26, 2026
370514f
plotting
DRL May 26, 2026
a1d3fac
Update plot.py
DRL May 26, 2026
17542cb
Update analysis.py
DRL May 26, 2026
c2f95ea
bugfix
DRL May 26, 2026
80dee68
Update analysis.py
DRL May 26, 2026
3cfed5e
bugfix
DRL May 26, 2026
4226c09
plot
DRL May 27, 2026
9af0d46
tree
DRL May 27, 2026
30fc446
Update utils.py
DRL May 27, 2026
c25f141
Merge pull request #107 from genomehubs/reduced_memory_reqs
DRL May 27, 2026
60666f6
bugfixes
DRL May 27, 2026
4712b52
changes
DRL May 29, 2026
6d2c511
testing
DRL May 29, 2026
c2d6131
Update analysis.py
DRL May 29, 2026
d591d96
Update analysis.py
DRL May 29, 2026
242b21c
major changes
DRL Jun 3, 2026
51a2bf4
vast changes
DRL Jun 8, 2026
98076a0
fixed bug
DRL Jun 9, 2026
c2c298e
bugfix
DRL Jun 9, 2026
30a9e57
major changes
DRL Jun 17, 2026
f6911ea
Merge pull request #110 from genomehubs/improved_interpro
DRL Jun 17, 2026
ea1c9e3
Update plot.py
DRL Jun 18, 2026
0b41b51
cosmetics
DRL Jun 22, 2026
acb3917
remove cli plot
DRL Jun 22, 2026
1466395
removed plot cli
DRL Jun 22, 2026
6f2e6e4
removed plot cli
DRL Jun 22, 2026
4878b64
added length feature
DRL Jun 22, 2026
e8dc867
improved plotting
DRL Jun 22, 2026
0ad6f79
comments
DRL Jun 29, 2026
a8b669a
Update .gitignore
DRL Jun 29, 2026
e2f9a53
changed log mesage
DRL Jun 29, 2026
224d41b
fixed bug re plotting of pvalues of 0.0
DRL Jun 29, 2026
11bdd60
Fixed bug
DRL Jun 30, 2026
8bdc463
comments, removal of old args
DRL Jul 3, 2026
7256b0e
added conditional for plotting files
DRL Jul 3, 2026
ed81d5c
BED parsing workflow
DRL Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ venv
result
.DS_Store
.env
data
data/*

# Logs
logs
Expand Down Expand Up @@ -42,3 +42,4 @@ dist-ssr
*.sw?

*storybook.log
src_new/src/core/network_stuff.py
43 changes: 43 additions & 0 deletions scripts/repeats_to_tsv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3

import sys

import pandas as pd


def run(fn):
header = []
rows = []
with open(fn) as fh:
for idx, line in enumerate(fh):
# print(line)
if not header:
_ = line.split()
header = [
"score",
"div",
"del",
"ins",
"sequence",
"qstart",
"qend",
"qleft",
"C",
"repeat",
"family",
"mstart",
"mend",
"mleft",
"ID",
"last",
]
else:
row = line.split()
rows.append({h: r for h, r in zip(header, row)})
# if idx == 30:
# sys.exit(1)
pd.DataFrame.from_dict(rows).to_csv(f"{fn}.tsv", sep="\t", index=False)


if __name__ == "__main__":
run(sys.argv[1])
40 changes: 40 additions & 0 deletions src_new/config/logging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"simple": {
"format": ""
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "DEBUG",
"formatter": "simple",
"stream": "ext://sys.stdout"
},
"logfile": {
"class": "logging.FileHandler",
"level": "DEBUG",
"formatter": "simple",
"filename": "kinfin.log"
}
},
"loggers": {
"my_module": {
"level": "DEBUG",
"handlers": [
"console",
"logfile"
],
"propagate": false
}
},
"root": {
"level": "DEBUG",
"handlers": [
"console",
"logfile"
]
}
}
2 changes: 2 additions & 0 deletions src_new/data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
20 changes: 20 additions & 0 deletions src_new/docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 0. install requirement (i cleaned them up)
```
pip install -r requirements.txt
```

# 1. uncompress tgz's in test

# 2. run examples

```
KINFIN="/Users/dom/git/genomehubs-kinfin/src_new"

# leps
OUTDIR="/Users/dom/data/leps"
python $KINFIN/src/main.py analysis -g $KINFIN/test/leps.orthogroups.txt -c $KINFIN/test/leps.config.csv -p 10 -v -I -N -P -d $OUTDIR

# nems
OUTDIR="/Users/dom/data/nems"
python $KINFIN/src/main.py analysis -g $KINFIN/test/nematodes.orthogroups.txt -c $KINFIN/test/nematodes.config.csv -i $KINFIN/test/nematodes.interproscan.tsv -f $KINFIN/test/nematodes_fastas -t $KINFIN/test/nematodes.tree.nwk -o CELEG CBRIG -p 10 -v -N -d $OUTDIR
```
21 changes: 21 additions & 0 deletions src_new/docs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### git
$ git clone https://github.com/genomehubs/kinfin.git
$ cd genomehubs-kinfin/
$ git checkout new_cli
$ cd genomehubs-kinfin/src_new

### create pyenv (or uv)
$ pyenv virtualenv kinfin

### install dependencies
$ pip install -r genomehubs-kinfin/src_new/requirements.txt

### edit config file
# missing value = NA

### analysis
### adjust paths to your setup
$ python genomehubs-kinfin/src_new/src/main.py analysis -g orthogroups.txt -c config.csv -f fastas/ -d psyche_output -X -r family -p 10 -N -v

### convert (feather to tsv)
$ python genomehubs-kinfin/src_new/src/main.py convert -t FILE.feather -F tsv
7 changes: 7 additions & 0 deletions src_new/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ete4==4.4.0
pandas==3.0.2
prettytable==3.17.0
requests==2.33.0
scipy==1.13.1
tqdm==4.67.3
pyarrow==24.0.0
Loading
Loading