Skip to content

Support for BICSeq2 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amcpherson opened this issue Feb 27, 2017 · 0 comments
Open

Support for BICSeq2 #14

amcpherson opened this issue Feb 27, 2017 · 0 comments

Comments

@amcpherson
Copy link

It appears that the bicseq output has changed (perhaps from bicseq to bicseq2). As a result BICSeqToTHetA doesnt work with the most recent version of bicseq2. Is there any reason to not use bicseq2 as input to theta?

In case it is helpful, the following python code does most of what BICSeqToTHetA does, and is robust to column order:

import pandas as pd

segs = pd.read_csv(
    bicseq2_seg_filename, sep='\t',
    converters={'chrom': str, 'start': int, 'end': int})
segs['#ID'] = (
    'start_' + segs['chrom'] + '_' + segs['start'].astype(str) +
    'end_' + segs['chrom'] + '_' + segs['end'].astype(str))
segs['chrm'] = segs['chrom']
segs['tumorCount'] = segs['tumor']
segs['normalCount'] = segs['normal']
segs['length'] = segs['end'] - segs['start']

# Length filter (default 10Mb)
segs = segs[segs['length'] >= config.get('min_length', int(10e6))]

theta_seg_filename = os.path.join(tmp_directory, 'theta_input.seg')
cols = ['#ID', 'chrm', 'start', 'end', 'tumorCount', 'normalCount']
segs[cols].to_csv(theta_seg_filename, sep='\t', index=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant