---
name: "Bio::PopGen::TagHaplotype"
section: "3pm"
platform: "linux"
package: "libbio-perl-perl"
version: "1.7.2-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Bio::PopGen::TagHaplotype"
---

# Bio::PopGen::TagHaplotype(3pm)

Haplotype tag object.

## NAME

Bio::PopGen::TagHaplotype.pm - Haplotype tag object.

## SYNOPSIS

```
    use Bio::PopGen::TagHaplotype;
    my $obj = Bio::PopGen::TagHaplotype -> new($hap);
```

## DESCRIPTION

This module take as input a haplotype and try toe get the minimal set of SNP that define the haplotype. This module can be use alone.  But due to the tagging haplotype process is exponential one. My suggestion is that before to use this module you pass your data under Select.mp module also on this folder.  In any case if, you provide an haplotype the module will try to find the answer to your question.

## CONSTRUCTORS

```
    my $obj = Bio::PopGen::TagHaplotype -> new($hap);
    were $hap is the reference to an array of array with the haplotype.
    $hap= [[0, 0, 0],
           [1, 0, 0],
           [0, 1, 1]
          ];
```

## FEEDBACK

### Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list.  Your participation is much appreciated.

```
  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
```

### Support

Please direct usage questions or support issues to the mailing list:

*bioperl-l@bioperl.org*

rather than to the module maintainer directly. Many experienced and  reponsive experts will be able look at the problem and quickly  address it. Please include a thorough description of the problem  with code and data examples if at all possible.

### Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:

```
  https://github.com/bioperl/bioperl-live/issues
```

## AUTHOR - Pedro M. Gomez-Fabre

Email pgf18872-at-gsk-dot-com

### new

```
 Title   : new
 Function: constructor of the class.
 Returns : self hash
 Args    : input haplotype (array of array)
 Status  : public
```

### haplotype\_block

```
 Title   : haplotype_block
 Usage   : my $haplotype_block = $TagHaplotype->haplotype_block();
 Function: Get the haplotype block for a haplotype tagging selection
 Returns : reference of array
 Args    : reference of array with haplotype pattern
```

### input\_block

```
 Title   : input_block
 Usage   : $obj->input_block()
 Function: returns haplotype block. By now will produce the same output than
           $self->haplotype_block. but for compatibility, this method is kept.
           This method is deprecated.
 Returns : reference to array of array with the haplotype input value
 Args    : none
 Status  : public
```

### tag\_list

```
 Title   : tag_list
 Usage   : $obj->tag_list()
 Function: returns the list of SNPs combination that identify the
           haplotype. All combinations are displayed as arrays
 Returns : reference to array of array.
 Args    : none
 Status  : public
```

### tag\_length

```
 Title   : tag_length
 Usage   : $obj->tag_length()
 Function: returns the length of the tag.
 Returns : scalar
 Args    : none
 Status  : public
```

### \_scan\_snp

```
 Title   : _scan_snp
 Usage   : internal
 Function: scan sets increasing the length until find a non degenerated
           pattern.
 Returns : scalar
 Args    : none
 Status  : private
```

### \_gen\_comb

```
 Title   : _gen_comb
 Usage   : internal
 Function: we supply the length of the haplotype and the length of the
           word we need to find and the functions returns the possible
           list of combinations.
 Returns : scalar
 Args    : none
 Status  : private
```

### \_generateCombinations

```
 Title   : _generateCombinations
 Usage   : internal
 Function: Recursive function that produce all combinations for a set
           i.e.:
           1, 2, 3, 4
           and word of B<3> will produce:
           1, 2, 3
           1, 2, 4
           1, 3, 4
           2, 3, 4
 Returns :
 Args    : none
 Status  : private
```

### \_scan\_combinations

```
 Title   : _scan_combinations
 Usage   : internal
 Function: take the haplotype and a list of possible combination
           for that length. Generate a subset and scan it to find if
           the information is enough to define the haplotype set.
 Returns :
 Args    : none
 Status  : private
```
