Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catherine Harvey Project Outline #4

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1c73576
Add files via upload
harveycas Feb 27, 2020
0b96efd
Draft 1 one the final project.
harveycas Apr 23, 2020
c835be0
Delete Final project.2.ipynb
harveycas Apr 23, 2020
98b809b
First draft for final project
harveycas Apr 23, 2020
cbc1dd9
Delete Final project.2.ipynb
harveycas Apr 23, 2020
244792e
draft for final project
harveycas Apr 23, 2020
77aea65
second draft for final project
harveycas Apr 30, 2020
e7b1cab
second draft new upload
harveycas Apr 30, 2020
29b80e6
copy of already posted document
harveycas Apr 30, 2020
6baa02d
addition of new files
harveycas Apr 30, 2020
6881e33
new folders made after meeting
harveycas Apr 30, 2020
49b9906
new changes from meeting
harveycas Apr 30, 2020
6c26cd9
uploaded excel document for code
harveycas May 5, 2020
4067c91
copying file used by module into tests folder for test processing
harveycas May 5, 2020
c2f5e2d
file upload to help understand code
harveycas May 5, 2020
2941018
Update README.tetrad_analysis_complete_program.py
harveycas May 5, 2020
25c24f9
upload definitions for code
harveycas May 5, 2020
ccd5ab8
definition of code for final project
harveycas May 5, 2020
99d364f
excel containing data used for code
harveycas May 5, 2020
2bdb103
Add files via upload
harveycas May 5, 2020
892cf18
Delete Final_project._.ipynb
harveycas May 5, 2020
8504815
final project code
harveycas May 5, 2020
3e865d6
final project code
harveycas May 5, 2020
dc6d9c7
final project code
harveycas May 5, 2020
2c20063
final project code
harveycas May 5, 2020
7cfc71a
final project code
harveycas May 5, 2020
1d62338
Update README.md
harveycas May 5, 2020
c98f971
code for final project
harveycas May 5, 2020
413aaa1
final project
harveycas May 5, 2020
b4c9347
05_05_2020 update
harveycas May 5, 2020
eeb5bae
Deleted unnecessary file
harveycas May 5, 2020
6d502c7
05052020_update
harveycas May 6, 2020
f80a44f
05052020
harveycas May 6, 2020
0098f93
05052020
harveycas May 6, 2020
287ffc7
dataframe functions for tetrad analysis
harveycas May 6, 2020
03d14e5
dataframe code corrections
harveycas May 6, 2020
d12550e
updated data frame_functions.py
harveycas May 6, 2020
0c47b1e
project update 05062020
harveycas May 6, 2020
b60c73a
project update 05062020
harveycas May 6, 2020
a57f0ef
project update 05062020
harveycas May 6, 2020
ea90bb1
final project revisions 05062020
harveycas May 6, 2020
815abba
Code for final project_05072020
harveycas May 7, 2020
2ebad4a
cleaned up README.md
harveycas May 7, 2020
8a473b0
final project corrections 05072020
harveycas May 7, 2020
2f06f1a
Updated test_tetrad_analysis.py
harveycas May 7, 2020
f0973a2
updated test_tetrad_analysis.py 05072020
harveycas May 7, 2020
bfe7e13
correction in tests
harveycas May 7, 2020
74fab9e
changes for tests
harveycas May 7, 2020
d8f9130
changes to test
harveycas May 7, 2020
9ce926b
test update
harveycas May 7, 2020
9f5d92d
corrections to final project
harveycas May 8, 2020
c7bcde1
final code for project
harveycas May 8, 2020
e7e77cd
final project corrections
harveycas May 8, 2020
b484919
final project document - correction 05082020
harveycas May 8, 2020
8920f77
tests for tetrad analysis code -final
harveycas May 8, 2020
10fdeb7
tetrad analysis code - final project 05_08_2020
harveycas May 8, 2020
e4f472a
tetrad analysis code_final_05_08_2020
harveycas May 8, 2020
c5dfa5e
updated setup.py
harveycas May 8, 2020
2e88413
tetrad analysis code_final_05_08_2020
harveycas May 8, 2020
1f288f7
tests for final project 05_08_2020
harveycas May 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .ipynb_checkpoints/setup-checkpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

import setuptools


with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="tetrad_analysis",
version="0.0.1",
author="Catherine_Harvey",
author_email="[email protected]",
description="A package to help analyze tetrads",
long_description= "A package to facilitate analyzing the antibiotic markers of yeast tetrads",
long_description_content_type="text/markdown",
url="https://github.com/harveycas/project_spring_2020",
packages=setuptools.find_packages(),
install_requires =['xlsxwriter'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',

)

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# project_spring_2020

[![CircleCI](https://circleci.com/gh/biof309/project_spring_2020/tree/master.svg?style=shield)](https://circleci.com/gh/biof309/project_spring_2020/tree/master)


# Tetrad Analysis

This package will allow for the user to upload an excel file consisting of tetrad information containing sample numbers and 1s and 0s, and allow for the user to sort their data by drug markers. Afterwards, the user can combine all their sorted data and create a new excel document that contains sheets for each drug marker. In these sheets, the positive marked spores that were filtered will be listed there.

# Imported file being used for practice

from tetrad_analysis import python_test_list.xlsx

# Steps of the program

1. import an excel document of choice and convert it into a dataframe that can be used by the program
2. sort this input by positive values for drug markers (in this case it would be the columns) and create separate dataframes for each drug marker
3. combine these dataframes into a single library that will be labeled all_positive
4. convert this library into a new excel document that will separate each drug marker into its own sheet


# Purpose for this program

This program will facilitate the process of sorting through data. There can be over hundreds of samples of tetrad data for analysis. It would take a long time to sort this amount. Therefore, by having a program that does it, it would save time.

# Contact
Catherine Harvey ([email protected])
Empty file.
84 changes: 84 additions & 0 deletions build/lib/tetrad_analysis/dataframe_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import pandas as pd
import numpy as np
import ast
from pandas import ExcelWriter
from pandas import ExcelFile

#reading the excel file that includes all of the tetrad data
df = pd.read_excel('python_test_list.xlsx')


def open_tetrad(excel):
"""cleaning a specific document from your computer"""

#delete the automatically generated column on the left-hand side
df_index = df.set_index(first_column)
df_index = df.set_index('Plate')
print(df_index)


def sort_NAT(excel):
'''This will allow for you to select for spores in tetrads that test positive for NAT and place them in their own excel document'''


#separate the positive spores from the negative spores
df_index.sort_values(['NAT'], ascending=False)
NAT_positive = df_index[df_index['NAT'] > 0]
print(NAT_positive)



#now take the positive ones and put them into their own excel document
dfNAT = pd.DataFrame(NAT_positive)
dfNAT.to_excel("NAT_positive_python_fp.xlsx")





def sort_HYG():
'''this will allow for you to select for spores in tetrads that test positive for HYG and place them in their own excel document'''

#separate the positive spores from the negative spores
sort_by_HYG = df_index.sort_values(['HYG'], ascending=False)
HYG_positive = df_index[df_index['HYG'] > 0]
print(HYG_positive)

#now take only the positive ones and place them in their own excel document
dfNAT = pd.DataFrame(HYG_positive)
dfNAT.to_excel("HYG_positive_python_fp.xlsx")





def sort_URA():
'''this will allow for you to select for spores in tetrads that test positiev for URA and place them in their own excel document'''

#separate the positive spores from the negative spores
sort_by_URA = df_index.sort_values(['URA'], ascending=False)
URA_positive = df_index[df_index['URA'] > 0]
print(URA_positive)

#now take only the positive ones and place them in their own document
dfNAT = pd.DataFrame(URA_positive)
dfNAT.to_excel("URA_positive_python_fp.xlsx")


def combine_antibiotics():
'''this will take the three marker documents that you made and place them in one major excel document where each marker is one sheet of the document'''

#create one dataframe containing all of the positive markers
all_positive = {'NAT_plus': NAT_positive, 'HYG_plus': HYG_positive, 'URA_plus': URA_positive}

#turn this new combined dataframe into an excel document
writer = pd.ExcelWriter('Antibiotic_markers.xlsx', engine='xlsxwriter')

for sheet_name in all_positive.keys():
all_positive[sheet_name].to_excel(writer, sheet_name=sheet_name, index=False)

writer.save()




4 changes: 4 additions & 0 deletions build/lib/tetrad_analysis/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def main():

if __name__ == '__main__':
main()
Binary file added dist/tetrad_analysis-0.0.1-py3.7.egg
Binary file not shown.
Loading