Skip to content

Developed out of a number of independent widget

Notifications You must be signed in to change notification settings

fancity-xia/widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

parseTree.py

This module implements the function of parsing and generating the txt result of linux tree.

from parseTree import *

# load from linux tree
tt = open("./tree.txt")
ff = LoadStructTree(tt)  # Store tree files as linked list structured data
tt.close()

# dump linknode as linux tree structure
dumpStructTree(ff, "")

# trans dict to linknode
h = [{
        "Alignment": [
            {"iPSC15P15QC": [
                "231107_M002_V350204528_L01_",
                "231107_M002_V350204528_L02_",
                "23117_M002_V350204528_L03_",
                {"ASD": ["ASD1", "ASD2", "ASD3"]}
            ]
            },
            {"iPSC16P15QC": ["iPSC17P15QC.chrfak03", "iPSC17P15QC.chrfak05", "iPSC17P15QC.chrfak04"]}
        ],
    },
        "report.pdf", ]

# print list as linux tree
listDumpTree(h, "")

├──Alignment
│   ├──iPSC15P15QC
│   │   ├── 231107_M002_V350204528_L01_
│   │   ├── 231107_M002_V350204528_L02_
│   │   ├── 23117_M002_V350204528_L03_
│   │   └──ASD
│   │      ├── ASD1
│   │      ├── ASD2
│   │      └── ASD3
│   └──iPSC16P15QC
│      ├── iPSC17P15QC.chrfak03
│      ├── iPSC17P15QC.chrfak05
│      └── iPSC17P15QC.chrfak04
└── report.pdf


tree = toTree(h)  # transfer list to linknode
dumpStructTree(tree, "")  # same with listDumptree

About

Developed out of a number of independent widget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages