Skip to content
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

Updates to the beacon breakends #567

Merged
merged 6 commits into from
May 23, 2019
Merged

Updates to the beacon breakends #567

merged 6 commits into from
May 23, 2019

Conversation

MalinAhlberg
Copy link
Member

@MalinAhlberg MalinAhlberg commented May 22, 2019

Describe the pull request:

  • Bug fix
  • Functional change

Pull request long description:

Small fixes to the sql model and the import script for breakends.
Also adds the --add_reversed_mates flag to the importer, to make a BND searchable in the beacon by using any of its two chromosome as the "main" one.

Changes made:

  1. Set default values for 0 allele_num (callCount) and allele_count (variantCount). '' for mate_id.
  2. Skip counting calls when importing mates, even when asked to, since we don't know what to do with these numbers anyway (the dataset usually already has that info stored in the db).
  3. "chromosomeStart" => chromosomeStart (don't enforce capital s)
  4. Add option --add_reversed_mates to importer. Adds one extra row to the db for each BND, representing the same breakend but with its mate encoded as the starting chromosme.

Question:

Should a "loop" like this

1 54720 cluster_216 N N[1:54720[

be kept once or twice in the db?

| chromosome | chromosomestart | chromosomepos | mate | matestart |   matepos   | 
-+------------+-----------------+---------------+------+-----------+-------------+
 | 1          |           54719 | cluster_216   | 1    |     54719 |             |
 | 1          |           54719 |               | 1    |     54719 | cluster_216 |

Don't enforce capital letters in the field name.
The manta data is usually part of another dataset, and the counts from
this file shold not override the counts already stored in the db.
@MalinAhlberg MalinAhlberg requested a review from viklund May 22, 2019 12:37
'mate_start': data['pos'], 'pos': data['mate_start'],
'chrom_id': data['mate_id'], 'mate_id': data['chrom_id']})
reversed['variant_id'] = '{}-{}-{}-{}'.format(reversed['chrom'], reversed['pos'], reversed['ref'], alt)
# TODO should the `counter` be increased here?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think so. If it would be counted if both directions were in the vcf file, it should be counted here as well.

Copy link
Member

@viklund viklund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expanded a comment as well.

@viklund viklund merged commit fe92811 into develop May 23, 2019
@talavis talavis deleted the feature/breakends branch June 13, 2019 09:04
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

Successfully merging this pull request may close these issues.

None yet

2 participants