Ejemplo n.º 1
0
 def type_hla_sequences(self, sequence_file):
     print self.loci
     log.info('Typing the selected HLA consensus sequences')
     typing = type_sequences(sequence_file,
                             grouping='locus',
                             exon_fofn=self.exon_reference,
                             genomic_reference=self.locus_reference,
                             cDNA_reference=self.cDNA_reference,
                             loci=self.loci)
     check_output_file(typing)
     log.info('Finished typing the selected HLA sequences\n')
     return typing
Ejemplo n.º 2
0
 def type_hla_sequences(self, sequence_file ):
     print self.loci
     log.info('Typing the selected HLA consensus sequences')
     typing = type_sequences( sequence_file,
                              grouping='locus',
                              exon_fofn=self.exon_reference,
                              genomic_reference=self.locus_reference,
                              cDNA_reference=self.cDNA_reference,
                              loci=self.loci)
     check_output_file( typing )
     log.info('Finished typing the selected HLA sequences\n')
     return typing
Ejemplo n.º 3
0
#! /usr/bin/env python

from pbhla.typing.sequences import type_sequences

if __name__ == '__main__':
    import argparse
    parser = argparse.ArgumentParser()

    add = parser.add_argument
    add('amplicon_analysis', metavar='INPUT',
        help="Fasta/Fastq/Folder of Amplicon Analysis output")
    add('-g', '--grouping', metavar='METHOD', default='both',
        help="Method of selecting output sequences {locus, barcode, both, all} default=both")
    add('-e', '--exon_reference', metavar='REFERENCE', default=None,
        help='Dictionary file of Locus-specific exon references')
    add('-n', '--nucleotide_reference', metavar='FASTA', default=None,
        help='File of FASTA sequences from nucleotide references')
    add('-c', '--cDNA_reference', metavar='FASTA', default=None,
        help='File of FASTA sequences from cDNA references')
    add('--debug', action='store_true',
        help="Flag to enable Debug mode")
    args = parser.parse_args()

    type_sequences( args.amplicon_analysis, args.grouping,
                                            args.exon_reference,
                                            args.nucleotide_reference,
                                            args.cDNA_reference )
Ejemplo n.º 4
0
        metavar='REFERENCE',
        default=None,
        help='Dictionary file of Locus-specific exon references')
    add('-n',
        '--nucleotide_reference',
        metavar='FASTA',
        default=None,
        help='File of FASTA sequences from nucleotide references')
    add('-c',
        '--cDNA_reference',
        metavar='FASTA',
        default=None,
        help='File of FASTA sequences from cDNA references')
    add('-t',
        '--trim',
        metavar='INT',
        default=0,
        type=int,
        help='Number of bases to trim from the ends of sequences before typing'
        )
    add('--debug', action='store_true', help="Flag to enable Debug mode")
    args = parser.parse_args()

    type_sequences(args.amplicon_analysis,
                   grouping=args.grouping,
                   exon_fofn=args.exon_reference,
                   genomic_reference=args.nucleotide_reference,
                   cDNA_reference=args.cDNA_reference,
                   trim=args.trim,
                   debug=args.debug)