diff fsd.py @ 10:f7136e93604b draft

planemo upload for repository https://github.com/monikaheinzl/galaxyProject/tree/master/tools/fsd commit b9403b3ce2b7a41fa8ee1aa47909152de78cf641
author mheinzl
date Tue, 15 May 2018 13:49:34 -0400
parents 43b16247c35a
children b615c7e51f40
line wrap: on
line diff
--- a/fsd.py	Wed May 09 09:41:38 2018 -0400
+++ b/fsd.py	Tue May 15 13:49:34 2018 -0400
@@ -11,8 +11,7 @@
 # If only one file is provided, then a family size distribution, which is separated after SSCSs without a partner and DCSs, is produced.
 # Whereas a family size distribution with multiple data in one plot is produced, when more than one file (up to 4) is given.
 
-# USAGE: python FSD_Galaxy_1.4_commandLine_FINAL.py filename --inputFile2 filename2 --inputFile3 filename3 --inputFile4 filename4 /
-#        --title_file outputFileName --sep "characterWhichSeparatesCSVFile"
+# USAGE: python FSD_Galaxy_1.4_commandLine_FINAL.py --inputFile1 filename --inputName1 filename --inputFile2 filename2 --inputName2 filename2 --inputFile3 filename3 --inputName3 filename3 --inputFile4 filename4 --inputName4 filename4 --sep "characterWhichSeparatesCSVFile" --output_csv outptufile_name_csv --output_pdf outptufile_name_pdf
 
 import numpy
 import matplotlib.pyplot as plt
@@ -55,7 +54,6 @@
 
     firstFile = args.inputFile1
     name1 = args.inputName1
-    #firstFile = args.inputName1
     
     secondFile = args.inputFile2
     name2 = args.inputName2
@@ -75,8 +73,8 @@
     plt.rc('figure', figsize=(11.69, 8.27))  # A4 format
     plt.rcParams['patch.edgecolor'] = "black"
     plt.rcParams['axes.facecolor'] = "E0E0E0"  # grey background color
-    plt.rcParams['xtick.labelsize'] = 12
-    plt.rcParams['ytick.labelsize'] = 12
+    plt.rcParams['xtick.labelsize'] = 14
+    plt.rcParams['ytick.labelsize'] = 14
 
     list_to_plot = []
     label = []
@@ -86,8 +84,6 @@
        fig = plt.figure()
        plt.subplots_adjust(bottom=0.25)
        if firstFile != str(None):
-           print(firstFile)
-           
            file1 = readFileReferenceFree(firstFile)
            integers = numpy.array(file1[:, 0]).astype(int)  ## keep original family sizes
 
@@ -217,8 +213,8 @@
        plt.xticks(numpy.array(ticks), ticks1)
 
        plt.legend(loc='upper right', fontsize=14, frameon=True, bbox_to_anchor=(0.9, 1))
-       plt.title("Family Size Distribution", fontsize=14)
-       plt.xlabel("No. of Family Members", fontsize=14)
+     #  plt.title("Family Size Distribution", fontsize=14)
+       plt.xlabel("Family size", fontsize=14)
        plt.ylabel("Absolute Frequency", fontsize=14)
        plt.margins(0.01, None)
        plt.grid(b=True, which="major", color="#424242", linestyle=":")
@@ -325,8 +321,8 @@
             last = counts[0][2][len(counts[0][0]) - 1]  # large families
 
             plt.legend(loc='upper right', fontsize=14, bbox_to_anchor=(0.9, 1), frameon=True)
-            plt.title(name1, fontsize=14)
-            plt.xlabel("No. of Family Members", fontsize=14)
+         #   plt.title(name1, fontsize=14)
+            plt.xlabel("Family size", fontsize=14)
             plt.ylabel("Absolute Frequency", fontsize=14)
             plt.margins(0.01, None)
             plt.grid(b=True, which="major", color="#424242", linestyle=":")