biopipen 0.28.1__py3-none-any.whl → 0.29.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of biopipen might be problematic. Click here for more details.
- biopipen/__init__.py +1 -1
- biopipen/core/config.toml +8 -0
- biopipen/ns/bam.py +0 -2
- biopipen/ns/bed.py +35 -0
- biopipen/ns/cellranger_pipeline.py +5 -5
- biopipen/ns/cnv.py +18 -2
- biopipen/ns/cnvkit_pipeline.py +16 -11
- biopipen/ns/gene.py +68 -23
- biopipen/ns/misc.py +2 -15
- biopipen/ns/plot.py +146 -0
- biopipen/ns/regulation.py +214 -0
- biopipen/ns/scrna.py +15 -3
- biopipen/ns/snp.py +516 -8
- biopipen/ns/stats.py +74 -2
- biopipen/ns/vcf.py +196 -0
- biopipen/reports/snp/PlinkCallRate.svelte +24 -0
- biopipen/reports/snp/PlinkFreq.svelte +18 -0
- biopipen/reports/snp/PlinkHWE.svelte +18 -0
- biopipen/reports/snp/PlinkHet.svelte +18 -0
- biopipen/reports/snp/PlinkIBD.svelte +18 -0
- biopipen/scripts/bam/CNVpytor.py +144 -46
- biopipen/scripts/bed/BedtoolsIntersect.py +54 -0
- biopipen/scripts/bed/BedtoolsMerge.py +1 -1
- biopipen/scripts/cnv/AneuploidyScore.R +30 -7
- biopipen/scripts/cnv/AneuploidyScoreSummary.R +5 -2
- biopipen/scripts/cnv/TMADScore.R +21 -5
- biopipen/scripts/cnv/TMADScoreSummary.R +6 -2
- biopipen/scripts/cnvkit/CNVkitAccess.py +2 -1
- biopipen/scripts/cnvkit/CNVkitAutobin.py +3 -2
- biopipen/scripts/cnvkit/CNVkitBatch.py +1 -1
- biopipen/scripts/cnvkit/CNVkitCoverage.py +2 -1
- biopipen/scripts/cnvkit/CNVkitGuessBaits.py +1 -1
- biopipen/scripts/cnvkit/CNVkitHeatmap.py +1 -1
- biopipen/scripts/cnvkit/CNVkitReference.py +2 -1
- biopipen/scripts/gene/GeneNameConversion.R +65 -0
- biopipen/scripts/gene/GenePromoters.R +61 -0
- biopipen/scripts/misc/Shell.sh +15 -0
- biopipen/scripts/plot/Manhattan.R +140 -0
- biopipen/scripts/plot/QQPlot.R +62 -0
- biopipen/scripts/regulation/MotifAffinityTest.R +226 -0
- biopipen/scripts/regulation/MotifAffinityTest_AtSNP.R +126 -0
- biopipen/scripts/regulation/MotifAffinityTest_MotifBreakR.R +96 -0
- biopipen/scripts/regulation/MotifScan.py +159 -0
- biopipen/scripts/regulation/atSNP.R +33 -0
- biopipen/scripts/regulation/motifBreakR.R +1594 -0
- biopipen/scripts/scrna/MarkersFinder.R +59 -67
- biopipen/scripts/scrna/SeuratClustering.R +63 -29
- biopipen/scripts/scrna/SeuratMap2Ref.R +20 -0
- biopipen/scripts/scrna/SeuratSubClustering.R +76 -27
- biopipen/scripts/snp/MatrixEQTL.R +84 -43
- biopipen/scripts/snp/Plink2GTMat.py +133 -0
- biopipen/scripts/snp/PlinkCallRate.R +190 -0
- biopipen/scripts/snp/PlinkFilter.py +100 -0
- biopipen/scripts/snp/PlinkFreq.R +298 -0
- biopipen/scripts/snp/PlinkFromVcf.py +78 -0
- biopipen/scripts/snp/PlinkHWE.R +80 -0
- biopipen/scripts/snp/PlinkHet.R +92 -0
- biopipen/scripts/snp/PlinkIBD.R +197 -0
- biopipen/scripts/snp/PlinkUpdateName.py +124 -0
- biopipen/scripts/stats/MetaPvalue.R +2 -1
- biopipen/scripts/stats/MetaPvalue1.R +70 -0
- biopipen/scripts/tcr/TCRClusterStats.R +12 -7
- biopipen/scripts/vcf/BcftoolsAnnotate.py +91 -0
- biopipen/scripts/vcf/BcftoolsFilter.py +90 -0
- biopipen/scripts/vcf/BcftoolsSort.py +113 -0
- biopipen/scripts/vcf/BcftoolsView.py +73 -0
- biopipen/scripts/vcf/VcfFix_utils.py +1 -1
- biopipen/scripts/vcf/bcftools_utils.py +52 -0
- biopipen/utils/gene.R +83 -37
- biopipen/utils/gene.py +108 -60
- biopipen/utils/misc.R +56 -0
- biopipen/utils/misc.py +5 -2
- biopipen/utils/reference.py +54 -10
- {biopipen-0.28.1.dist-info → biopipen-0.29.0.dist-info}/METADATA +2 -2
- {biopipen-0.28.1.dist-info → biopipen-0.29.0.dist-info}/RECORD +77 -49
- {biopipen-0.28.1.dist-info → biopipen-0.29.0.dist-info}/entry_points.txt +1 -1
- biopipen/ns/bcftools.py +0 -111
- biopipen/scripts/bcftools/BcftoolsAnnotate.py +0 -42
- biopipen/scripts/bcftools/BcftoolsFilter.py +0 -79
- biopipen/scripts/bcftools/BcftoolsSort.py +0 -19
- biopipen/scripts/gene/GeneNameConversion.py +0 -66
- {biopipen-0.28.1.dist-info → biopipen-0.29.0.dist-info}/WHEEL +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import pandas
|
|
2
|
-
from datar.all import c, right_join, select, relocate
|
|
3
|
-
from biopipen.utils.gene import gene_name_conversion
|
|
4
|
-
|
|
5
|
-
infile = {{in.infile | quote}} # pyright: ignore
|
|
6
|
-
outfile = {{out.outfile | quote}} # pyright: ignore
|
|
7
|
-
inopts = {{envs.inopts | repr}} # pyright: ignore
|
|
8
|
-
outopts = {{envs.outopts | repr}} # pyright: ignore
|
|
9
|
-
notfound = {{envs.notfound | repr}} # pyright: ignore
|
|
10
|
-
genecol = {{envs.genecol | repr}} # pyright: ignore
|
|
11
|
-
output = {{envs.output | repr}} # pyright: ignore
|
|
12
|
-
infmt = {{envs.infmt | repr}} # pyright: ignore
|
|
13
|
-
outfmt = {{envs.outfmt | repr}} # pyright: ignore
|
|
14
|
-
species = {{envs.species | quote}} # pyright: ignore
|
|
15
|
-
|
|
16
|
-
df = pandas.read_csv(infile, **inopts)
|
|
17
|
-
|
|
18
|
-
if isinstance(genecol, int):
|
|
19
|
-
genes = df.iloc[:, genecol]
|
|
20
|
-
else:
|
|
21
|
-
genes = df.loc[:, genecol]
|
|
22
|
-
|
|
23
|
-
colname = genes.name
|
|
24
|
-
genes = genes.tolist()
|
|
25
|
-
|
|
26
|
-
# query `outfmt`
|
|
27
|
-
# <object> <object>
|
|
28
|
-
# 0 1255_g_at GUCA1A
|
|
29
|
-
# 1 1316_at THRA
|
|
30
|
-
# 2 1320_at PTPN21
|
|
31
|
-
# 3 1294_at MIR5193
|
|
32
|
-
converted = gene_name_conversion(
|
|
33
|
-
genes=genes,
|
|
34
|
-
species=species,
|
|
35
|
-
infmt=infmt,
|
|
36
|
-
outfmt=outfmt,
|
|
37
|
-
notfound=notfound,
|
|
38
|
-
)
|
|
39
|
-
converted.columns = [colname] + converted.columns[1:].tolist()
|
|
40
|
-
|
|
41
|
-
if output == "only":
|
|
42
|
-
out = converted
|
|
43
|
-
|
|
44
|
-
elif output == "keep":
|
|
45
|
-
out = df >> right_join(converted, by=colname, suffix=["", "_converted"])
|
|
46
|
-
|
|
47
|
-
elif output == "drop":
|
|
48
|
-
out = df >> right_join(
|
|
49
|
-
converted,
|
|
50
|
-
by=colname, suffix=["", "_converted"]
|
|
51
|
-
) >> select(~c(colname))
|
|
52
|
-
|
|
53
|
-
elif output == "replace":
|
|
54
|
-
out = df >> right_join(
|
|
55
|
-
converted, by=colname, suffix=["", "_converted"]
|
|
56
|
-
)
|
|
57
|
-
converted_cols = out.columns[-len(converted.columns)+1:].tolist()
|
|
58
|
-
pos = df.columns.get_indexer([colname])[0]
|
|
59
|
-
out = out >> relocate(
|
|
60
|
-
converted_cols, _after=pos+1
|
|
61
|
-
) >> select(~c(colname))
|
|
62
|
-
|
|
63
|
-
else:
|
|
64
|
-
raise ValueError(f"Unknown output mode: {output}.")
|
|
65
|
-
|
|
66
|
-
out.to_csv(outfile, **outopts)
|
|
File without changes
|