Skip to content

Commit dce99f8

Browse files
authored
Version 3.3.2 (#43)
Fix program error in some low-depth regions
1 parent bc7134f commit dce99f8

17 files changed

Lines changed: 197 additions & 113 deletions

LICENSE

Lines changed: 0 additions & 34 deletions
This file was deleted.

LICENSE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Pacific Biosciences Software License Agreement
2+
1. **Introduction and Acceptance.** This Software License Agreement (this “**Agreement**”) is a legal agreement between you (either an individual or an entity) and Pacific Biosciences of California, Inc. (“**PacBio**”) regarding the use of the PacBio software accompanying this Agreement, which includes documentation provided in “online” or electronic form (together, the “**Software**”). PACBIO PROVIDES THE SOFTWARE SOLELY ON THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT AND ON THE CONDITION THAT YOU ACCEPT AND COMPLY WITH THEM. BY DOWNLOADING, DISTRIBUTING, MODIFYING OR OTHERWISE USING THE SOFTWARE, YOU (A) ACCEPT THIS AGREEMENT AND AGREE THAT YOU ARE LEGALLY BOUND BY ITS TERMS; AND (B) REPRESENT AND WARRANT THAT: (I) YOU ARE OF LEGAL AGE TO ENTER INTO A BINDING AGREEMENT; AND (II) IF YOU REPRESENT A CORPORATION, GOVERNMENTAL ORGANIZATION OR OTHER LEGAL ENTITY, YOU HAVE THE RIGHT, POWER AND AUTHORITY TO ENTER INTO THIS AGREEMENT ON BEHALF OF SUCH ENTITY AND BIND SUCH ENTITY TO THESE TERMS. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, PACBIO WILL NOT AND DOES NOT LICENSE THE SOFTWARE TO YOU AND YOU MUST NOT DOWNLOAD, INSTALL OR OTHERWISE USE THE SOFTWARE OR DOCUMENTATION.
3+
2. **Grant of License.** Subject to your compliance with the restrictions set forth in this Agreement, PacBio hereby grants to you a non-exclusive, non-transferable license during the Term to install, copy, use, distribute in binary form only, and host the Software. If you received the Software from PacBio in source code format, you may also modify and/or compile the Software.
4+
3. **License Restrictions.** You may not remove or destroy any copyright notices or other proprietary markings. You may only use the Software to process or analyze data generated on a PacBio instrument or otherwise provided to you by PacBio. Any use, modification, translation, or compilation of the Software not expressly authorized in Section 2 is prohibited. You may not use, modify, host, or distribute the Software so that any part of the Software becomes subject to any license that requires, as a condition of use, modification, hosting, or distribution, that (a) the Software, in whole or in part, be disclosed or distributed in source code form or (b) any third party have the right to modify the Software, in whole or in part.
5+
4. **Ownership.** The license granted to you in Section 2 is not a transfer or sale of PacBio’s ownership rights in or to the Software. Except for the license granted in Section 2, PacBio retains all right, title and interest (including all intellectual property rights) in and to the Software. The Software is protected by applicable intellectual property laws, including United States copyright laws and international treaties.
6+
5. **Third Party Materials.** The Software may include software, content, data or other materials, including related documentation and open source software, that are owned by one or more third parties and that are subject to separate licensee terms (“**Third-Party Licenses**”). A list of all materials, if any, can be found the documentation for the Software. You acknowledge and agree that such third party materials subject to Third-Party Licenses are not licensed to you pursuant to the provisions of this Agreement and that this Agreement shall not be construed to grant any such right and/or license. You shall have only such rights and/or licenses, if any, to use such third party materials as set forth in the applicable Third-Party Licenses.
7+
6. **Feedback.** If you provide any feedback to PacBio concerning the functionality and performance of the Software, including identifying potential errors and improvements (“**Feedback**”), such Feedback shall be owned by PacBio. You hereby assign to PacBio all right, title, and interest in and to the Feedback, and PacBio is free to use the Feedback without any payment or restriction.
8+
7. **Confidentiality.** You must hold in the strictest confidence the Software and any related materials or information including, but not limited to, any Feedback, technical data, research, product plans, or know-how provided by PacBio to you, directly or indirectly in writing, orally or by inspection of tangible objects (“**Confidential Information**”). You will not disclose any Confidential Information to third parties, including any of your employees who do not have a need to know such information, and you will take reasonable measures to protect the secrecy of, and to avoid disclosure and unauthorized use of, the Confidential Information. You will immediately notify the PacBio in the event of any unauthorized or suspected use or disclosure of the Confidential Information. To protect the Confidential Information contained in the Software, you may not reverse engineer, decompile, or disassemble the Software, except to the extent the foregoing restriction is expressly prohibited by applicable law.
9+
8. **Termination.** This Agreement will terminate upon the earlier of: (a) your failure to comply with any term of this Agreement; or (b) return, destruction, or deletion of all copies of the Software in your possession. PacBio’s rights and your obligations will survive the termination of this Agreement. The “**Term**” means the period beginning on when this Agreement becomes effective until the termination of this Agreement. Upon termination of this Agreement for any reason, you will delete from all of your computer libraries or storage devices or otherwise destroy all copies of the Software and derivatives thereof.
10+
9. **NO OTHER WARRANTIES.** THE SOFTWARE IS PROVIDED ON AN “AS IS” BASIS. YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED FROM THE SOFTWARE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, PACBIO DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, QUALITY, ACCURACY, TITLE, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE SOFTWARE AND THE ACCOMPANYING WRITTEN MATERIALS. THERE IS NO WARRANTY AGAINST INTERFERENCE WITH THE ENJOYMENT OF THE SOFTWARE OR AGAINST INFRINGEMENT. THERE IS NO WARRANTY THAT THE SOFTWARE OR PACBIO’S EFFORTS WILL FULFILL ANY OF YOUR PARTICULAR PURPOSES OR NEEDS.
11+
10. **LIMITATION OF LIABILITY.** UNDER NO CIRCUMSTANCES WILL PACBIO BE LIABLE FOR ANY CONSEQUENTIAL, SPECIAL, INDIRECT, INCIDENTAL OR PUNITIVE DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF DATA OR OTHER SUCH PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF PACBIO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL PACBIO’S AGGREGATE LIABILITY FOR DAMAGES ARISING OUT OF THIS AGREEMENT EXCEED $5. THE FOREGOING EXCLUSIONS AND LIMITATIONS OF LIABILITY AND DAMAGES WILL NOT APPLY TO CONSEQUENTIAL DAMAGES FOR PERSONAL INJURY.
12+
11. **Indemnification.** You will indemnify, hold harmless, and defend PacBio (including all of its officers, employees, directors, subsidiaries, representatives, affiliates, and agents) and PacBio’s suppliers from and against any damages (including attorney’s fees and expenses), claims, and lawsuits that arise or result from your use of the Software.
13+
12. **Trademarks.** Certain of the product and PacBio names used in this Agreement, the Software may constitute trademarks of PacBio or third parties. You are not authorized to use any such trademarks.
14+
13. **Export Restrictions.** YOU UNDERSTAND AND AGREE THAT THE SOFTWARE IS SUBJECT TO UNITED STATES AND OTHER APPLICABLE EXPORT-RELATED LAWS AND REGULATIONS AND THAT YOU MAY NOT EXPORT, RE-EXPORT OR TRANSFER THE SOFTWARE OR ANY DIRECT PRODUCT OF THE SOFTWARE EXCEPT AS PERMITTED UNDER THOSE LAWS. WITHOUT LIMITING THE FOREGOING, EXPORT, RE-EXPORT, OR TRANSFER OF THE SOFTWARE TO CUBA, IRAN, NORTH KOREA, SYRIA, RUSSIA, BELARUS, AND THE REGIONS OF CRIMEA, LNR, AND DNR OF UKRAINE IS PROHIBITED.
15+
14. **General.** This Agreement is governed by the laws of the State of California, without reference to its conflict of laws principles. This Agreement is the entire agreement between you and PacBio and supersedes any other communications with respect to the Software. If any provision of this Agreement is held invalid or unenforceable, the remainder of this Agreement will continue in full force and effect.

paraphase/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.3.1"
1+
__version__ = "3.3.2"

paraphase/genes/cfc1_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ def __init__(
2121

2222
def call(self):
2323
if self.check_coverage_before_analysis() is False:
24-
return self.GeneCall()
24+
return self.GeneCall(
25+
genome_depth=self.mdepth,
26+
region_depth=self.region_avg_depth._asdict(),
27+
sample_sex=self.sample_sex,
28+
)
2529
self.get_homopolymer()
2630
self.get_candidate_pos()
2731
self.het_sites = sorted(list(self.candidate_pos))
@@ -34,6 +38,9 @@ def call(self):
3438
homo_sites=homo_sites_to_add,
3539
)
3640

41+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
42+
if simple_call is not None:
43+
return simple_call
3744
(
3845
ass_haps,
3946
original_haps,
@@ -42,7 +49,7 @@ def call(self):
4249
nonuniquely_supporting_reads,
4350
raw_read_haps,
4451
read_counts,
45-
) = self.phase_haps(raw_read_haps)
52+
) = phase_result
4653

4754
tmp = {}
4855
for i, hap in enumerate(ass_haps):

paraphase/genes/f8_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ def get_read_positions(self, genome_bamh, min_extension=5000):
8585

8686
def call(self):
8787
if self.check_coverage_before_analysis() is False:
88-
return self.GeneCall()
88+
return self.GeneCall(
89+
genome_depth=self.mdepth,
90+
region_depth=self.region_avg_depth._asdict(),
91+
sample_sex=self.sample_sex,
92+
)
8993

9094
genome_bamh = pysam_handle(self.genome_bam, self.reference_fasta)
9195
e1_e22_depth = self.get_regional_depth(genome_bamh, self.depth_region)[0].median
@@ -122,6 +126,9 @@ def call(self):
122126
kept_sites=self.add_sites,
123127
)
124128

129+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
130+
if simple_call is not None:
131+
return simple_call
125132
(
126133
ass_haps,
127134
original_haps,
@@ -130,7 +137,7 @@ def call(self):
130137
nonuniquely_supporting_reads,
131138
raw_read_haps,
132139
read_counts,
133-
) = self.phase_haps(raw_read_haps)
140+
) = phase_result
134141

135142
total_cn = len(ass_haps)
136143
tmp = {}

paraphase/genes/hba_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ def check_two_haps_in_cis(alleles, name1, name2):
5959

6060
def call(self):
6161
if self.check_coverage_before_analysis() is False:
62-
return self.GeneCall()
62+
return self.GeneCall(
63+
genome_depth=self.mdepth,
64+
region_depth=self.region_avg_depth._asdict(),
65+
sample_sex=self.sample_sex,
66+
)
6367
genome_bamh = pysam_handle(self.genome_bam, self.reference_fasta)
6468
surrounding_region_depth = self.get_regional_depth(
6569
genome_bamh, self.depth_region
@@ -73,6 +77,9 @@ def call(self):
7377
self.init_het_sites = [a for a in self.het_sites]
7478
raw_read_haps = self.get_haplotypes_from_reads(check_clip=True, min_clip_len=9)
7579

80+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
81+
if simple_call is not None:
82+
return simple_call
7683
(
7784
ass_haps,
7885
original_haps,
@@ -81,7 +88,7 @@ def call(self):
8188
nonuniquely_supporting_reads,
8289
raw_read_haps,
8390
read_counts,
84-
) = self.phase_haps(raw_read_haps)
91+
) = phase_result
8592

8693
count_hba1 = 0
8794
count_hba2 = 0

paraphase/genes/ikbkg_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ def set_parameter(self, config):
4242

4343
def call(self):
4444
if self.check_coverage_before_analysis() is False:
45-
return self.GeneCall()
45+
return self.GeneCall(
46+
genome_depth=self.mdepth,
47+
region_depth=self.region_avg_depth._asdict(),
48+
sample_sex=self.sample_sex,
49+
)
4650
self.get_homopolymer()
4751

4852
## get deletion ##
@@ -96,6 +100,9 @@ def call(self):
96100
)
97101
self.het_sites = het_sites
98102

103+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
104+
if simple_call is not None:
105+
return simple_call
99106
(
100107
ass_haps,
101108
original_haps,
@@ -104,7 +111,7 @@ def call(self):
104111
nonuniquely_supporting_reads,
105112
raw_read_haps,
106113
read_counts,
107-
) = self.phase_haps(raw_read_haps)
114+
) = phase_result
108115

109116
total_cn = len(ass_haps)
110117
tmp = {}

paraphase/genes/ncf1_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ def set_parameter(self, config):
3737

3838
def call(self):
3939
if self.check_coverage_before_analysis() is False:
40-
return self.GeneCall()
40+
return self.GeneCall(
41+
genome_depth=self.mdepth,
42+
region_depth=self.region_avg_depth._asdict(),
43+
sample_sex=self.sample_sex,
44+
)
4145
pivot_site = self.pivot_site
4246
for pileupcolumn in self._bamh.pileup(
4347
self.nchr, pivot_site, pivot_site + 1, truncate=True
@@ -56,6 +60,9 @@ def call(self):
5660

5761
raw_read_haps = self.get_haplotypes_from_reads(add_sites=self.add_sites)
5862

63+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
64+
if simple_call is not None:
65+
return simple_call
5966
(
6067
ass_haps,
6168
original_haps,
@@ -64,7 +71,7 @@ def call(self):
6471
nonuniquely_supporting_reads,
6572
raw_read_haps,
6673
read_counts,
67-
) = self.phase_haps(raw_read_haps)
74+
) = phase_result
6875

6976
total_cn = len(ass_haps)
7077
tmp = {}

paraphase/genes/neb_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ def set_parameter(self, config):
3535

3636
def call(self):
3737
if self.check_coverage_before_analysis() is False:
38-
return self.GeneCall()
38+
return self.GeneCall(
39+
genome_depth=self.mdepth,
40+
region_depth=self.region_avg_depth._asdict(),
41+
sample_sex=self.sample_sex,
42+
)
3943
self.get_homopolymer()
4044
self.get_candidate_pos()
4145
self.het_sites = sorted(list(self.candidate_pos))
@@ -47,6 +51,9 @@ def call(self):
4751
homo_sites=homo_sites_to_add,
4852
)
4953

54+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
55+
if simple_call is not None:
56+
return simple_call
5057
(
5158
ass_haps,
5259
original_haps,
@@ -55,7 +62,7 @@ def call(self):
5562
nonuniquely_supporting_reads,
5663
raw_read_haps,
5764
read_counts,
58-
) = self.phase_haps(raw_read_haps)
65+
) = phase_result
5966

6067
tmp = {}
6168
for i, hap in enumerate(ass_haps):

paraphase/genes/opn1lw_phaser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ def phase_single_allele(
173173

174174
def call(self):
175175
if self.check_coverage_before_analysis() is False:
176-
return self.GeneCall()
176+
return self.GeneCall(
177+
genome_depth=self.mdepth,
178+
region_depth=self.region_avg_depth._asdict(),
179+
sample_sex=self.sample_sex,
180+
)
177181
self.get_homopolymer()
178182
self.get_candidate_pos(min_vaf=0.08)
179183
self.het_sites = sorted(list(self.candidate_pos))
@@ -187,6 +191,9 @@ def call(self):
187191
homo_sites=homo_sites_to_add,
188192
)
189193

194+
simple_call, phase_result = self.phase_haps_catch_error(raw_read_haps)
195+
if simple_call is not None:
196+
return simple_call
190197
(
191198
ass_haps,
192199
original_haps,
@@ -195,7 +202,7 @@ def call(self):
195202
nonuniquely_supporting_reads,
196203
raw_read_haps,
197204
read_counts,
198-
) = self.phase_haps(raw_read_haps)
205+
) = phase_result
199206

200207
tmp = {}
201208
for i, hap in enumerate(ass_haps):

0 commit comments

Comments
 (0)