Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

64 rindas
2.4 KiB

  1. /* vcmp.h -- reference allele utility functions.
  2. Copyright (C) 2013-2015 Genome Research Ltd.
  3. Author: Petr Danecek <pd3@sanger.ac.uk>
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated documentation files (the "Software"), to deal
  6. in the Software without restriction, including without limitation the rights
  7. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. copies of the Software, and to permit persons to whom the Software is
  9. furnished to do so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. THE SOFTWARE. */
  19. #ifndef __VCMP_H__
  20. #define __VCMP_H__
  21. typedef struct _vcmp_t vcmp_t;
  22. vcmp_t *vcmp_init(void);
  23. void vcmp_destroy(vcmp_t *vcmp);
  24. /*
  25. * vcmp_set_ref() - sets and compares reference alleles
  26. * Returns 0 on success or -1 if alleles not compatible
  27. */
  28. int vcmp_set_ref(vcmp_t *vcmp, char *ref1, char *ref2);
  29. /*
  30. * vcmp_find_allele()
  31. * @param als1: alternate alleles to ref1 above
  32. * @param al2: alternate allele to ref2 above
  33. * Returns -1 if not found or 0-based index to als1 of matching allele
  34. */
  35. int vcmp_find_allele(vcmp_t *vcmp, char **als1, int nals1, char *al2);
  36. /*
  37. * vcmp_map_ARvalues() - Create mapping for Number=A,R tag values
  38. * @param number: nals2 for Number=R, nals2-1 for Number=A
  39. * @param nals1: number of alleles
  40. * @param als1: alleles
  41. *
  42. * Returns pointer to an array of size nals2 with mapping from als2
  43. * to als1 or NULL if REFs (als1[0] and als2[0]) are not compatible.
  44. * If i is the index of an allele in als2, ret[i] is the index of matching
  45. * allele in als1 or -1 if als2 does not have a matching allele.
  46. * The caller must not free the array.
  47. */
  48. int *vcmp_map_ARvalues(vcmp_t *vcmp, int number, int nals1, char **als1, int nals2, char **als2);
  49. int *vcmp_map_dipGvalues(vcmp_t *vcmp, int *nmap);
  50. #endif