~ubuntu-branches/ubuntu/trusty/mira/trusty-proposed

« back to all changes in this revision

Viewing changes to src/mira/assembly_output.C

  • Committer: Package Import Robot
  • Author(s): Thorsten Alteholz, Thorsten Alteholz, Andreas Tille
  • Date: 2014-02-02 22:51:35 UTC
  • mfrom: (7.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140202225135-nesemzj59jjgogh0
Tags: 4.0-1
[ Thorsten Alteholz ]
* New upstream version 
* debian/rules: add boost dir in auto_configure (Closes: #735798)

[ Andreas Tille ]
* cme fix dpkg-control
* debian/patches/{make.patch,spelling.patch}: applied upstream (thus removed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include "assembly_output.H"
34
34
 
35
 
#include <iomanip>
36
 
 
37
 
#include <sys/types.h>
38
 
#include <sys/stat.h>
39
 
#include <unistd.h>
40
 
// for getting username etc
41
 
#include <pwd.h>
42
 
 
43
 
// getting time in GBF output
44
 
#include <time.h>
45
35
 
46
36
#include <boost/lexical_cast.hpp>
47
37
 
48
38
 
 
39
#include "io/annotationmappings.H"
49
40
#include "util/fileanddisk.H"
50
 
 
51
 
#include "io/annotationmappings.H"
52
41
#include "mira/gff_parse.H"
53
42
 
54
43
 
201
190
  openFileForAppend(filename,infoout, true);
202
191
  dateStamp(infoout);
203
192
  infoout << '\n' << asi;
204
 
  infoout.close();
 
193
 
 
194
  FUNCEND();
 
195
}
 
196
 
 
197
/*************************************************************************
 
198
 *
 
199
 *
 
200
 *
 
201
 *
 
202
 *************************************************************************/
 
203
 
 
204
void assout::saveLargeContigsInfo(AssemblyInfo & asi, const string & filename, bool deleteoldfile)
 
205
{
 
206
  FUNCSTART("void saveLargeContigsInfo(AssemblyInfo & asi, const string & filename, bool deleteoldfile)");
 
207
 
 
208
  (void) deleteoldfile;
 
209
 
 
210
  ofstream infoout;
 
211
  openFileForAppend(filename,infoout, true);
 
212
  asi.dumpLargeContigNames(infoout);
205
213
 
206
214
  FUNCEND();
207
215
}
1274
1282
    //  (makes the search loop afterwards easier)
1275
1283
 
1276
1284
    list<gbfsummary_t> allGBfeatures;
1277
 
    cle.getGBFSummary(allGBfeatures,allowedfeatures,forbiddenfeatures,true, true);
 
1285
    // BaCh 11.09.2013: don't take consensus features into analysis
 
1286
    // MIRA tags showing up (don't want to filter them atm) and gene /CDS features
 
1287
    //  in consensus are not set by MIRA anyway. Therefore: save work, implement
 
1288
    //  only if need arises (i.e. probably never)
 
1289
    cle.getGBFSummary(allGBfeatures,allowedfeatures,forbiddenfeatures,true, false);
1278
1290
 
1279
1291
    // continue with next contig if there are no features in here
1280
1292
    if(allGBfeatures.empty()) continue;
1385
1397
            const char * dnap=strain_consseq[strainid].c_str();
1386
1398
            dnap+=fI->cfrom;
1387
1399
            for(uint32 ii=fI->cfrom; ii<= fI->cto; dnap++, ii++){
1388
 
              if(*dnap=='X') basesnocov++;
 
1400
              if(toupper(*dnap)=='X') basesnocov++;
1389
1401
            }
1390
1402
 
1391
1403
            CEBUGNPQ("basesnocov: " << basesnocov << '\n');
2254
2266
{
2255
2267
  FUNCSTART("void assout::saveStrainsAsFASTAQ(Contig & outcon, const ReadPool & rp, const string & paddedfilename, bool asfastq, uint32 mincoverage, base_quality_t minqual, bool deleteoldfile, bool fillholesinstrain)");
2256
2268
 
 
2269
  // make sure to dump "AllStrains" only if we have more than one strain
 
2270
  int32 startid=-1;
 
2271
  if(ReadGroupLib::getNumReadGroups()==1) startid=0;
 
2272
 
2257
2273
  for(int32 strainid=-1; strainid<static_cast<int32>(ReadGroupLib::getNumOfStrains()); ++strainid){
2258
2274
    //if(outcon.getNumReadsPerStrain(strainid)==0) continue;
2259
2275
    string strainfilename;
2260
2276
    if(strainid>=0){
2261
2277
      strainfilename=ReadGroupLib::getStrainOfStrainID(strainid);
2262
 
      cout << "### doing " << strainfilename << " for strainid " << strainid << endl;
2263
2278
    }else{
2264
2279
      strainfilename="AllStrains";
2265
2280
    }
 
2281
    cout << "### calc " << strainfilename << " with strainid " << strainid << endl;
2266
2282
    try{
2267
2283
      if(asfastq){
2268
2284
        ofstream fastqpaddedout;
3053
3069
    //   used for linking
3054
3070
    //
3055
3071
    //  This might also be the reason for a reported crash of
3056
 
    //   convert_project on a 2.6 kernel (with another glibc than my
 
3072
    //   miraconvert on a 2.6 kernel (with another glibc than my
3057
3073
    //   home machine
3058
3074
    //
3059
3075
    // Resolve: get back to getlogin() even if manual says it can be