File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,6 +297,12 @@ CoalescentTree::CoalescentTree(string paren) {
297297 (*it).setX (xloc);
298298 }
299299
300+ // iSNV
301+ if (stringOne == " iSNV" ) {
302+ double xloc = atof (stringTwo.c_str ());
303+ (*it).setX (xloc);
304+ }
305+
300306 // LATITUDE
301307 if (stringOne == " latitude" ) {
302308 double xloc = atof (stringTwo.c_str ());
Original file line number Diff line number Diff line change @@ -844,6 +844,20 @@ void IO::printSkylines() {
844844 // MIGRATION ///////////////////////
845845 if (param.skyline_mig_rates ) {
846846 cout << " Printing migration skyline to " << outputFile << endl;
847+
848+ for (double t = start; t + step <= stop; t += step) {
849+ Series s;
850+ for (int i = 0 ; i < treelist.size (); i++) {
851+ CoalescentTree ct = treelist[i];
852+ ct.trimEnds (t,t+step);
853+ double n = ct.getMigRate ();
854+ s.insert (n);
855+ }
856+ outStream << " mig_all\t " ;
857+ outStream << t + step / (double ) 2 << " \t " ;
858+ outStream << s.quantile (0.025 ) << " \t " << s.mean () << " \t " << s.quantile (0.975 ) << endl;
859+ }
860+
847861 for (is = lset.begin (); is != lset.end (); ++is) {
848862 for (js = lset.begin (); js != lset.end (); ++js) {
849863 string from = *is;
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ void Parameters::importLine(string line) {
146146 break ;
147147 else if (*is >= ' a' && *is <= ' z' && vstring.size () == 0 )
148148 pstring += *is;
149- else if ( (*is >= ' 0' && *is <= ' 9' ) || (*is >= ' a' && *is <= ' z' ) || (*is >= ' A' && *is <= ' Z' ) || *is == ' .' || *is == ' -' || *is == ' /' || *is == ' _' )
149+ else if ( (*is >= ' 0' && *is <= ' 9' ) || (*is >= ' a' && *is <= ' z' ) || (*is >= ' A' && *is <= ' Z' ) || *is == ' .' || *is == ' -' || *is == ' /' || *is == ' _' || *is == ' | ' )
150150 vstring += *is;
151151 else if (vstring.size () > 0 ) {
152152 values.push_back ( atof (vstring.c_str ()) );
You can’t perform that action at this time.
0 commit comments