A couple of Python scripts needed (right now)

Job ID: 34989346

Budget: $30 – $250 USD

Hey guys,

This is a fixed project, $45.

I am looking for someone to work with me in a coming couple of hours to create a couple of python scripts.
In total, I need two simple scripts. Below, I describe the first one:

I have a Sample.csv file that I want to convert into a violin plot.
I need a script to run like this:

python copy_number_counter.py Sample.csv

to create two input files:
Sample_by_copy_number.csv
Samply_violin_plots.csv

Attached you can see an example of input and output files that I have created manually.
My actual files are much larger but have the same format.

Here is an explanation of what the script should do:

1. Read the input file
2. Count the number of occurrences for each value in column D. For instance, the words "Acidipila rosea" occur only once in column D, and the words "Actinomadura mexicana" occur three times.
3. Print the occurrence numbers into column G to create Sample_by_copy_number.csv

4. To create Sample_violin_plot.csv, the script should take values from column C of the input file, remove repetitions, and count distribution of the corresponding values in column D by copy number. For instance, for "Proteobacteria", there are three different entries in column D, and each of these entries occurs only once. Therefore, the output line for this one will look like:
Proteobacteria 3 0 0 0

I hope this explanation, along with the input and output files, makes it clear.
When this script is done, I will ask you to create another one, a simpler one (find an overlap between two files .csv files).

Thank you very much for your help
Related categories: Perl Python