-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
599aa95
commit b7edce9
Showing
10 changed files
with
140 additions
and
35 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: "3.8" | ||
services: | ||
|
||
|
||
# Elasticsearch Docker Images: https://www.docker.elastic.co/ | ||
elasticsearch: | ||
mem_limit: 1G | ||
mem_reservation: 128M | ||
cpus: 0.7 | ||
image: docker.elastic.co/elasticsearch/elasticsearch:8.5.0 | ||
container_name: elasticsearch | ||
environment: | ||
- xpack.security.enabled=false | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
- discovery.type=single-node | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
nofile: | ||
soft: 65536 | ||
hard: 65536 | ||
cap_add: | ||
- IPC_LOCK | ||
volumes: | ||
- elasticsearch-data:/usr/share/elasticsearch/data | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
|
||
kibana: | ||
container_name: kibana | ||
image: docker.elastic.co/kibana/kibana:8.5.0 | ||
environment: | ||
SERVER_NAME: kibana | ||
ELASTICSEARCH_HOSTS: http://elasticsearch:9200 | ||
ports: | ||
- 5601:5601 | ||
depends_on: | ||
- elasticsearch | ||
|
||
volumes: | ||
elasticsearch-data: | ||
driver: local |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ ijson==3.1.4 | |
pydantic==1.10.2 | ||
python-dotenv==0.21.0 | ||
requests==2.28.1 | ||
pandas |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import argparse | ||
import json | ||
import csv | ||
from collections import defaultdict | ||
|
||
import pandas as pd | ||
|
||
def group_columns(file_path): | ||
df = pd.read_csv(file_path, delimiter='\t', dtype=str) | ||
|
||
col_hashes = {col: hash(tuple(df[col])) for col in df.columns} | ||
|
||
groups = defaultdict(list) | ||
for col, col_hash in col_hashes.items(): | ||
groups[col_hash].append(col) | ||
|
||
duplicate_groups = {f"group{i+1}": cols for i, cols in enumerate(groups.values()) if len(cols) > 1} | ||
|
||
return duplicate_groups | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("file_path", type=str, help="Path to the TSV file.") | ||
|
||
args = parser.parse_args() | ||
result = group_columns(args.file_path) | ||
|
||
print(json.dumps(result, indent=4)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
#SBATCH --ntasks=1 | ||
#SBATCH --time=50:00:00 | ||
#SBATCH --account=pdthomas_136 | ||
#SBATCH --partition=thomas | ||
#SBATCH --mem-per-cpu=20G | ||
#SBATCH --mail-type=end,fail | ||
#SBATCH [email protected] | ||
|
||
|
||
base_dir='$BASE_DIR' | ||
in_file='$IN_FILE' | ||
out_dir='$OUT_DIR' | ||
es_index='annoq-annotations' | ||
|
||
module load python/3.9.12 | ||
python3 --version | ||
source venv/bin/activate | ||
|
||
echo "python3 convert_to_json.py -i $in_file -o $out_dir --es_index $es_index" | ||
echo start at `date` | ||
python3 $base_dir/annoq-database/src/convert_to_json.py -i $in_file -o $out_dir --es_index $es_index | ||
echo end at `date` |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Error: Exactly 2 arguments are required." | ||
echo "Usage: $0 <work_name> <wgsa_dir>" | ||
exit 1 | ||
fi | ||
|
||
work_name=$1 | ||
base_dir=$2 | ||
|
||
echo "running work name: $work_name using base dir: $base_dir" | ||
|
||
in_dir=$base_dir/annoq-data-builder/wgsa_add/output/$work_name | ||
out_dir=$base_dir/annoq-database/output/$work_name | ||
slurm_dir=$base_dir/annoq-database/slurm/$work_name | ||
sbatch_template=$base_dir/annoq-database/src/db_batch.template | ||
|
||
rm -rf $out_dir $slurm_dir | ||
|
||
mkdir -p $slurm_dir | ||
mkdir -p $out_dir | ||
|
||
for fp in `ls $in_dir` ; do | ||
echo $in_dir/$fp | ||
mkdir -p $out_dir/${fp} | ||
BASE_DIR=$base_dir IN_FILE=$in_dir/${fp} OUT_DIR=$out_dir/${fp} \ | ||
envsubst '$BASE_DIR, $IN_FILE, $OUT_DIR' < $sbatch_template > $slurm_dir/slurm_${fp}.slurm | ||
sbatch $slurm_dir/slurm_${fp}.slurm | ||
done |
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