Skip to content

Commit 671b68b

Browse files
committed
resolve conflicts
2 parents 3f37488 + cecbf4c commit 671b68b

6 files changed

+28
-23
lines changed
-24.5 KB
Binary file not shown.
Binary file not shown.
250 Bytes
Loading

Misc/Images/notebook.png

47.4 KB
Loading

Notebooks/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Notebooks are free to use and edit.
22
There are actually identical to the equivalent module at [scripts folder](https://github.com/jsarriaa/PHGv2Tools/tree/main/Modules) but it is coded to work different just if the file is ending in .py or .ipynb.
3-
![notebook_screenshoot](https://github.com/user-attachments/assets/152aaf58-f4b4-4ea8-ba75-716c5bcca2f1)
4-
When defining the main function, note the block of code where input variables are defined. When working in a notebook declare there whatever you need. Whole script will run with them.
3+
![notebook_screenshoot](https://github.com/jsarriaa/PHGv2Tools/blob/main/Misc/Images/notebook.png)
4+
Just on top of the main function, see the "AmIaNotebook" function. You can declare there whatever is provide as argument on the command line function. It will work on the same way.

README.md

+26-21
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,24 @@ Modules supported now:
3232

3333
#### Quick Start
3434
```
35-
range-pangenome-evolution --hvcf-folder /Example_database/output/vcf_files/ --reference-file Ref.fa --range-bedfile output/ref_ranges.bed
35+
phgtools range-pangenome-evolution --pangenome-hvcf-folder /Example_database/output/vcf_files/ --reference-fasta Ref.fa --range-bedfile output/ref_ranges.bed
3636
37-
core-range-detecter --pangenome-hvcf output/MergedLinesA_B_C.h.vcf
37+
phgtools core-range-detecter --pangenome-hvcf output/MergedLinesA_B_C.h.vcf
3838
39-
plot-pangenome-chromosomes --hvcf-folder output/vcf_files/ --reference-hvcf output/Ref.h.vcf.gz --chromosome chr2 --region 15000-35000 --reference-fasta Ref.fa
39+
phgtools plot-pangenome-chromosomes --pangenome-hvcf-folder output/vcf_files/ --reference-hvcf output/Ref.h.vcf.gz --chromosome chr2 --region 15000-35000 --reference-fasta Ref.fa
4040
41-
check-haplotype-alleles --hvcf output/MergedLinesA_B_C.h.vcf --reference-fasta Ref.fa --start 18800 --end 20100 --chromosome 2
41+
phgtools check-haplotype-alleles --pangenome-hvcf output/MergedLinesA_B_C.h.vcf --reference-fasta Ref.fa [--start 18800 --end 20100 --chromosome 2]
4242
43-
check-imputated-haplotype --hvcf-folder output/ --hvcf-file output/LineD.h.vcf
43+
phgtools check-imputated-haplotype --pangenome-folder output/ --imputed-hvcf output/LineD.h.vcf
4444
45-
plot-imputed-hvcf --input-hvcf output/LineD.h.vcf --pangenome-hvcf-folder output/ --reference-hvcf hvcf_files/Ref.h.vcf.gz
45+
phgtools plot-imputed-hvcf --imputed-hvcf output/LineD.h.vcf --pangenome-hvcf-folder output/ --reference-hvcf hvcf_files/Ref.h.vcf.gz
4646
```
4747

48+
<<<<<<< HEAD
49+
=======
50+
Find examples of usage at the [Example database](https://github.com/jsarriaa/PHGv2Tools/tree/main/Example_database)
51+
52+
>>>>>>> origin/main
4853
## Installation
4954
To use this package, a conda environment is used. It is a modified version of the original phg one, adding the pygenometracks package for python plotting. For everything further needed, it will be updated.
5055

@@ -112,7 +117,7 @@ Extrapolating this into the PHG ranges, it is useful to have the information of
112117
- sector diagram plotting the % of core, accessory and unique haplotypes.
113118
It takes as arguments:
114119
```
115-
--pangenome-hvcf // -hvcf <Merged of all hvcf of the pangenome database> #Built with phg merge-hvcfs
120+
--pangenome-hvcf // -phvcf <Merged of all hvcf of the pangenome database> #Built with phg merge-hvcfs
116121
```
117122
![image_1_hvcf_plot](https://github.com/jsarriaa/PHGv2Tools/blob/main/Misc/Images/merged_hvcfs_19092024.h.vcf_1.png)
118123
![image_2_hvcf_plot](https://github.com/jsarriaa/PHGv2Tools/blob/main/Misc/Images/merged_hvcfs_19092024.h.vcf_2.png)
@@ -124,9 +129,9 @@ A pangenome store all variability from species that a single reference genome ca
124129
``` range-pangenome-evolution``` is the script stacking one by one the haplotype files and plotting the number of ranges. Taking as arguments:
125130

126131
```
127-
--hvcf-folder // -hf <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
128-
--reference-file // -ref <Reference.fasta> #Built with phg prepare-assemblies
129-
--range-bedfile // <reference_ranges.bed> #Built with phg create-ranges
132+
--pangenome-hvcf-folder // -pfolder <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
133+
--reference-fasta // -ref-fa <Reference.fasta> #Built with phg prepare-assemblies
134+
--range-bedfile // -bed <reference_ranges.bed> #Built with phg create-ranges
130135
```
131136
![range_evolution](https://github.com/jsarriaa/PHGv2Tools/blob/main/Misc/Images/range_evolution.png)
132137

@@ -135,10 +140,10 @@ A pangenome store all variability from species that a single reference genome ca
135140
Module to plot a region of a chromosome (or the whole chr) of the pangenome.
136141
If not region is specified, it will be plotted the entire chromosome. The script is ```plot-pangenome-chromosomes``` and its agruments are:
137142
```
138-
--hvcf-folder // -hvcf <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
139-
--reference-hvcf // -ref <Reference.h.vcf> #Built with phg create-ref-vcf
143+
--pangenome-hvcf-folder // -pfolder <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
144+
--reference-hvcf // -refhvcf <Reference.h.vcf> #Built with phg create-ref-vcf
140145
--chromosome // -chr <chrX> i.e. [chr1], [chr22]
141-
--reference-fasta // -fa <Reference.fasta> #Built with phg prepare-assemblies
146+
--reference-fasta // -ref-fa <Reference.fasta> #Built with phg prepare-assemblies
142147
--region // -reg <START-END> i.e. [10000-20000] #If not added, whole chr is plotted
143148
```
144149
![FULL_chr_plot](https://github.com/jsarriaa/PHGv2Tools/blob/main/Misc/Images/pangenome_FULL_chr5.png)
@@ -150,12 +155,12 @@ For those who are looking for genes alleles; Ranges are built with genes annotat
150155

151156
These are the mandatory arguments:
152157
```
153-
--hvcf // -hf <Merged of all hvcf of the pangenome database> #Built with phg merge-hvcfs
154-
--reference-fasta // -ref <Reference.fasta> #Built with phg prepare-assemblies
158+
--pangenome-hvcf // -phvcf <Merged of all hvcf of the pangenome database> #Built with phg merge-hvcfs
159+
--reference-fasta // -ref-fa <Reference.fasta> #Built with phg prepare-assemblies
155160
```
156161
And then, provide the coordinates. These are optional, but will be asked ahead if there are not as a command line argument.
157162
```
158-
--chromosome // -c <INT> i.e. <2>
163+
--chromosome // -chr <INT> i.e. <2>
159164
--start // -s <START> i.e. <1000>
160165
--end // -e <END> i.e. <5000>
161166
```
@@ -189,18 +194,18 @@ Taking an imputed h.vcf from ```phg map-kmers``` and ```find-paths``` and plots
189194

190195
```plot-imputed-hvcf``` takes as argument:
191196
```
192-
--input-hvcf // -hvcf <Imputed h.vcf> #Built with phg find-paths
193-
--reference-hvcf // -ref <Reference.h.vcf> #Built with phg create-ref-vcf
194-
--pangenome-hvcf-folder // -folder <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
197+
--imputed-hvcf // -ihvcf <Imputed h.vcf> #Built with phg find-paths
198+
--reference-hvcf // -refhvcf <Reference.h.vcf> #Built with phg create-ref-vcf
199+
--pangenome-hvcf-folder // -pfolder <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
195200
```
196201

197202

198203

199204
- #### Check identity against pangenome
200205
Reads all pangenome haplotypes and compare with an imputated h.vcf, to extract the percentage of the genome is used to build up the imputed haplotype. It is now only based in nº ranges itself, not based in base pairs absolute amount. Call the script with ```check-imputated-haplotype``` and provide as arguments:
201206
```
202-
--hvcf-folder // -folder <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
203-
--hvcf-file // -file <Imputed h.vcf> #Built with phg find-paths
207+
--pangenome-hvcf-folder // -pf <Folder path to the h.vcf files of the pangenome database> #Built with phg create-maf-vcf
208+
--imputed-hvcf // -ihvcf <Imputed h.vcf> #Built with phg find-paths
204209
```
205210
Working on plotting the results, for now we get a list for the results:
206211
```

0 commit comments

Comments
 (0)