Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Sablok committed Mar 1, 2024
2 parents 0912394 6b0af99 commit 9fd3a9b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 116 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 1,15 @@
# graphanalyzer

a graphanalyzer package that uses the information from the paf and the gfa files for the graph alignment and uses the concurrency to process the alignments and other variables and uses a dataframe approach
a graphanalyzer package that uses the information from the paf and the gfa files for the graph alignment and uses the concurrency to process the alignments and other variables and uses a dataframe approach. You can find the code in the src/graphanalyzer.py and you can use those as import in your script untill the complete package is available from pip. a heuristic binary search implementation of the node in the graph clustering. It follows the stack implementation so that that the weight to the next node can be assigned on the search pattern. Written in a combination of C and python. Added the support for the visualization of graphics.

Update: 2024-3-1: Adding the support for the deadlock programming to enable the multi threads.

Gaurav Sablok \
Academic Staff Member \
Bioinformatics \
Institute for Biochemistry and Biology \
University of Potsdam \
Potsdam,Germany

## Installation

Expand Down
20 changes: 20 additions & 0 deletions src/graphanalyzer/gfareader.py
Original file line number Diff line number Diff line change
@@ -0,0 1,20 @@
#!/usr/bin/python
# Universitat Potsdam
# Author Gaurav Sablok
# date: 2024-2-29
def gfafastawrite(gfafile, filewrite):
"""
a gfa to fasta write for writing the graph connections for the
GFA files
"""
sort = list(pd.DataFrame([line.split("\t") for line in open("/home/gaurav/Downloads/MT.gfa")], \
columns = ["a","b","c","d","e","f","g"])["c"])
indices = [i for i in range(len(sort)) if " " not in sort[i] and "-" not in sort[i]]
sequences = [i for i in sort if " " not in i and "-" not in i]
ids = list(pd.DataFrame([line.split("\t") for line in open("/home/gaurav/Downloads/MT.gfa")], \
columns = ["a","b","c","d","e","f","g"])["b"])[0:len(indices)]
with open(filewrite, "w") as fastawrite:
for i in range(len(ids)):
fastawrite.write(">" ids[i])
fastawrite.write(sequences[i])
fastawrite.close()
115 changes: 0 additions & 115 deletions src/graphanalyzer/graphanalyzer.py

This file was deleted.

0 comments on commit 9fd3a9b

Please sign in to comment.