Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangrengang committed Jul 22, 2023
1 parent 91755dd commit 9f39ab4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ There are mainly four modules:
- Evaluate whether subgenomes are successfully phased by hierarchical clustering and principal component analysis (PCA).
2. The module to identify and test the enrichments of subgenome-specific kmers:
- Identify subgenome-specific kmers.
- Identify significant enrichments of subgenome-specific kmers by genome window/bin, which is useful to identify homoeologous exchanges (HEs; refer to [Supplementary Material](https://nph.onlinelibrary.wiley.com/action/downloadSupplement?doi=10.1111%2Fnph.18173&file=nph18173-sup-0001-SupInfo.pdf) for identifying bona fide HEs) and/or assembly errors (e.g. switch errors and hamming errors).
- Identify significant enrichments of subgenome-specific kmers by genome window/bin, which is useful to identify intewr-subgenomic exchanges (refer to [Supplementary Material](https://nph.onlinelibrary.wiley.com/action/downloadSupplement?doi=10.1111%2Fnph.18173&file=nph18173-sup-0001-SupInfo.pdf) for identifying bona fide exchanges) and/or assembly errors (e.g. switch errors and hamming errors).
- Identify subgenome-specific enrichments with user-defined features (e.g. transposable elements, genes) via `-custom_features`.
3. The LTR module to identify and analyze subgenome-specific LTR-RT elements (disable by `-disable_ltr`):
- Identify the LTR-RTs by `LTRharvest` and/or `LTRfinder` (time-consuming for large genome, especially `LTRfinder`).
Expand Down Expand Up @@ -187,8 +187,8 @@ In this study, `SubPhaser` was used to identify species-specific TEs among the a
> Zhang TC, Qiao Q, Du X et. al. Cultivated hawthorn (*Crataegus pinnatifida* var. *major*) genome sheds light on the evolution of Maleae (apple tribe) [J]. *J. Integr. Plant Biol.*, 2022, 64 (8): 1487–1501 [DOI:10.1111/jipb.13318](http://doi.org/https://doi.org/10.1111/jipb.13318)
#### Evolution of reticulate allopolyploidization ####
In this study, `SubPhaser` was used to partition subgenomes of both neo-allotetraploid and neo-allooctoploid poppy genomes,
identify homoeologous (HEs) exchanges between subgenomes and identify subgenome-specific LTR-RTs.
By analysing subgenome phylogeny, HE patterns and LTR-RT insertion time, a reticulate allopolyploidization evolutionary scenario was strongly supported.
identify exchanges between subgenomes and identify subgenome-specific LTR-RTs.
By analysing subgenome phylogeny, exchange patterns and LTR-RT insertion time, a reticulate allopolyploidization evolutionary scenario was strongly supported.
> Zhang RG, Lu C, Li G et. al. Subgenome-aware analyses suggest a reticulate allopolyploidization origin in three *Papaver* genomes [J]. *Nat. Commun.*, 2023, 14 (1): 2204 [DOI:10.1038/s41467-023-37939-2](http://doi.org/10.1038/s41467-023-37939-2)
### Contact ###
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
author='Zhang, Ren-Gang and Wang, Zhao-Xuan',
license='GPL-3.0',

python_requires='>=3.6:',
python_requires='>=3.6',
packages=find_packages(),
include_package_data=True,
scripts=[],
Expand Down
30 changes: 29 additions & 1 deletion subphaser/small_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
from .RunCmdsMP import logger

ISOTIMEFORMAT='%Y-%m-%d %X'

def lazy_decode(line):
try: line = line.decode()
except AttributeError: pass
return line

def mk_ckp(ckgfile, *data, log=True):
with open(ckgfile, 'wb') as f:
for dat in data:
Expand All @@ -52,6 +58,27 @@ def check_ckp(ckgfile, log=True, overwrite=False):
data += [dat]
return data
return False
def tr_numeric(val):
try: return int(val)
except:
try: return float(val)
except: return val
def parse_key_opts(args):
d = {}
pops = []
for i, arg in enumerate(args):
kv = arg.split('=', 1)
if len(kv) != 2:
continue
pops += [i]
key, val = kv
val = tr_numeric(val)
d[key] = val
for i in sorted(pops, reverse=1):
args.pop(i)
return d
def parse_kargs(*args):
return parse_key_opts(*args)

def sorted_version(lst, **kargs):
return sorted(lst, key=lambda x: get_version(x), **kargs)
Expand Down Expand Up @@ -129,7 +156,8 @@ def mkdirs(*dirs):
def rmdirs(*dirs):
for DIR in dirs:
if os.path.exists(DIR):
shutil.rmtree(DIR)
try: shutil.rmtree(DIR)
except OSError: os.remove(DIR)
else:
pass
def cpdir(from_dir, to_dir):
Expand Down

0 comments on commit 9f39ab4

Please sign in to comment.