Skip to content

Commit

Permalink
improve handling of cnseg file for different window sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
jluebeck committed Dec 13, 2023
1 parent 37a1697 commit c1424d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ Thickness of the arc qualitatively depicts the amount of paired-end read support
The SV view file may be uploaded to web interface for Cycle view to visualize the cycles in conjunction with the SV view.


### 5. [Intermediate] Copy number segmentation file `{out}_{CHROM}_{START}_{END}_cnseg.txt`
This files provides the segmentation of an interval based on coverage alone. Here `{CHROM}_{START}_{END}` represent the coordinates of the interval. First line represents the header. Tab-separated fields:
### 5. [Intermediate] Copy number segmentation file `{out}_{CHROM}_{START}_{END}_ws10000_cnseg.txt`
This files provides the segmentation of an interval based on coverage alone. The value after `ws` indicates the window size used for the segmentation. Here `{CHROM}_{START}_{END}` represent the coordinates of the interval. First line represents the header. Tab-separated fields:
- `{CHROM}`: Chromosome name
- `{START}`: Coordinate of the first basepair in the segment
- `{END}`: Coordinate of the last basepair in the segment
Expand Down
4 changes: 2 additions & 2 deletions src/bam_to_breakpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,8 @@ def meanshift_refined(self, i, window_size0=10000, window_size1=300, gcc=False,

def get_meanshift(self, i, window_size0=10000, window_size1=300, gcc=False):
logging.debug("get_meanshift on " + str(i))
file_name = "%s_%s_%s_%s_cnseg.txt" % (self.sample_name, i.chrom, i.start, i.end)
if os.path.exists(file_name) and i.end - i.start > 50000:
file_name = "%s_%s_%s_%s_ws%s_cnseg.txt" % (self.sample_name, i.chrom, i.start, i.end, window_size0)
if os.path.exists(file_name) and i.end - i.start > 50000 and window_size0 == 10000:
logging.debug("Re-using cn-seg info in " + file_name)
msfile = open(file_name)
msr = []
Expand Down

0 comments on commit c1424d9

Please sign in to comment.