Commits

opticall  committed 9a9fce7

added mean intensity identification and stop functionality

  • Participants
  • Parent commits 27433c2

Comments (0)

Files changed (2)

File opticall/filtering.cpp

 		if (  ( isnan(mdist) || isinf(mdist) || mdist < lower_bound || mdist > upper_bound )  && (exclude_list.size() == 0 || find (exclude_list.begin(), exclude_list.end(), i)  ==   exclude_list.end() )   )
 		{
 			outlying_samples.push_back(i);
-			cout << "excluding mean intensity outlier " << i << " with mdist " << mdist << endl;
+			cout << "excluding mean intensity outlier " << i << " with sampleid " << individuals[i]  << " and mdist " << mdist << endl;
 		}
 	}
 	

File opticall/opticall.cpp

 	bool nonorm = false;
 	bool noblank = false;
 	bool meanintfilter = false;
+	bool outliers_only = false;
 
 	if (argc < 5) { // Check the value of argc. If not enough parameters have been passed, inform user and exit.
 		cout << "Usage is -in <infile> -out <outdir>\n"; // Inform the user of how to use the program
 		} else if (string(argv[i]) == "-meanintfilter") {
 			cout << "filtering out samples based on mean-intensity across SNPs" << endl;
 			meanintfilter = true;
+		} else if (string(argv[i]) == "-meanintfilteronly") {
+			cout << "optiCall will output samples with outlying mean-intensity across SNPs, then stop. No Calling will be performed." << endl;
+			meanintfilter = true;
+			outliers_only = true;
 		} else if (string(argv[i]) == "-noblank") {
 			cout << "turning off HWE based SNP blanking" << endl;
 			noblank = true;
 	if (meanintfilter)
 	{
 		initial_outliers = findIntensityOutliers(fname, snpcount, individuals, initial_outliers_numsds, excluded_samples);
+		if (outliers_only)
+		{
+			exit(0);
+		}
 	}
 	
+