[BioLib-dev] Need to link another library gsl

Xin Shuai xshuai at umail.iu.edu
Mon Aug 3 20:37:22 UTC 2009


The problem of instantiation of all template functions in
Sequence::Alignment as well as template class Sequence::ClustalW.
Actually the solution is quite simple. I forgot to compile one important
source file, FastaExplicit.cc, into the libsequence dynamic library, which
is provided by libsequence library. This file declares explicit
instantiations for type Sequence::Fasta for those function templates as well
as class Sequence::ClustalW.

So, that related patch can be deleted.

However, there's still a problem I don' understand. Sequence::PolySites is a
normal class in libsequence but have a template constructor function. But I
don't have to first include any "explicit instantiation" declaration, but
can directly instantiate it in interface file using Sequence::Fasta type, as
well as use it in Python.

On Mon, Aug 3, 2009 at 12:51 PM, Xin Shuai <xshuai at umail.iu.edu> wrote:

> Let me explain the patch for you. I have mentioned
> beforethat I have problem of instantiate the template function with T =
> Sequence::Fasta:(But it is supposed to be )
>  template<typename T> bool  IsAlignment<http://molpopgen.org/software/libsequence/doc/html/namespaceSequence_1_1Alignment.html#f70c638b6bd67ac76bd3b310eef6da71> (const
> std::vector< T > &data)
> However, the PolySites template class can be instantiated by
> Sequence::Fasta and I did do it. The code section I comment out in the patch
> is just from the PolySites.tcc. So if I don't comment it out, error message
> will appeared and prevent me from wrapping the whole class. It won't affect
> unless you input a series of sequence with different length.
>
> However, it is still a but and I will try to fix it soon.
>
> On Mon, Aug 3, 2009 at 12:29 PM, Pjotr Prins <pjotr.public14 at thebird.nl>wrote:
>
>> Hi Xin,
>>
>> I have applied your patches to the libsequence tree. See
>>
>> http://github.com/pjotrp/libsequence/commit/d4676e555444f40aadabc9188b6946c868ededf8
>> .
>>
>> There is one patch changing functionality I hope you know what you are
>> doing:
>>
>> changes: -    if (Alignment::IsAlignment(alignment) == true)
>>         +  //  if (Alignment::IsAlignment(alignment) == true)
>>
>> You can pull in this tree into your repository by pulling from my
>> biolib/libsequence branch, and update submodules in biolib:
>>
>>  cd biolib
>>  git pull pjotr libsequence
>>  git submodule update
>>
>> That should do the trick. Check to see whether all patches have gone
>> in. I also modified the files.txt list, so it compiles again.
>>
>> Pj.
>>
>
>
>
> --
> Xin Shuai (David)
> PhD of Complex System in School of Informatics
> Indiana University Bloomington
> 812-606-8019
>



-- 
Xin Shuai (David)
PhD of Complex System in School of Informatics
Indiana University Bloomington
812-606-8019



More information about the BioLib-dev mailing list