Package: g3dtools
g3dtoolsA tool for operating .g3d (genome 3D structure) format, for more information please checkdocumentation.Require: Python (Recommend version 3 and above).example input, 6 columns bed-like text file (6th column is optional):chr716760000-14.3866688728-36.391930202919.8483965881m
chr716760000-24.911626807150.05212682879.91073185128p
chr725160000-10.1170055526-34.897576346920.2401719179m
chr725160000-21.821091564927.112855662113.4856945965p
chr733540000-4.11059384846-54.49400834644.21321135564m
chr733540000-12.004035985731.596049718326.6925954134p
chr7419400005.75342635105-55.49764287288.65307697332m
chr741940000-23.737202241336.061469226731.919119243p
chr750320000-10.7099779927-38.021400117125.8308473821m
chr750320000-28.514209816226.646849900128.8634805533p
chr726200000-11.5800097945-37.990325774416.2461100893m
chr726200000-15.955242662327.01694072417.5722080595p
chr727260000-14.1883124179-44.786080797312.4104162757m
chr727260000-20.085775429730.920414304118.4774635708p
chr728300000-18.0160836669-39.39854449512.811858164m
chr728300000-14.938302084339.146451677917.3743509519p
chr729360000-11.8032470923-47.359509531913.2828128833m
chr729360000-12.244527791641.243196817914.8844908717p
chr730400000-12.8674349856-45.07525897449.15498568359mcolumns are:chromosomestart positionX (coordinates in 3D)YZcategory (optional), usually haplotype or cell/sample type, or time point information can be used, like for haplotype,mformaternal,pforpaternal,sforshared, if omitted,sharedwill be used, or user can choosecell-1,cell-2etc. for cell identifier...This file input looks simiar to3dg formatexcept we put haplotype or category info on last column.Generate a new .g3d file using the format listed aboveg3dtools load ../test/test.g3d.bed.gz -o ../testOut/test -s 2,3,4,5,6,7,8,9,10 -n GM12878 -g hg19Generate a new .g3d file from .3dg formatInput a file with high resolution, let the tool calculate lower resolutions:g3dtools 3dg ../test/GSM3271347_gm12878_01.impute3.round4.clean.3dg.txt.gz -o ../testOut/GSM3271347_gm12878_01.impute3.round4.clean -n GM12878 -g hg19 -s 2,3,4,5,6,7,8,9,10or prepare different resolution files in advance.Generate a new .g3d file from PASTIS outputUser can also generate .g3d file frompastisoutput.g3dtools pastis -g Pfal3D7 -n Rings -o ../testOut/rings ../test/RINGS.3D_coord.txtg3dtools pastis-pdb  -g Pfal3D7 -n Rings -o ../testOut/rings_pdb -s 2,3,4,5,6 ~/Downloads/RINGS.pdbGenerate a new .g3d from nucle3d formatUser can also generate .g3d file fromnucle3dformat.g3dtools nucle3d -n k562 -g hg38 -o ../testOut/k562 ../test/K562.nucle3dQueryBy region:g3dtools query testOut/test.g3d -c chr7 -s 27053397 -e 27373765change haplotype (or category):g3dtools query -c chr7 -s 500000 -e 50000000 -y paternal ../testOut/test2.g3d > xchange resolution:g3dtools query testOut/test.g3d -c chr7 -s 27053397 -e 27373765 -r 100000when resolution not exists:$g3dtoolsquerytestOut/test.g3d-cchr7-s27053397-e27373765-r130000[Query] Error, resolution 130000 not exists for this file,available resolutions: [20000, 40000, 60000, 80000, 100000, 120000, 140000, 160000, 180000, 200000]Get metadata informationg3dtools meta testOut/test2.g3d{"version": 2,"genome": "hg19","name": "GM12878","resolutions": [20000,40000,60000,80000,100000,120000,140000,160000,180000,200000],"categories": ["maternal","paternal"]}