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

Update README.md #14

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
96e3ce3
Update README.md
dferhadian Feb 28, 2020
491dc73
Add files via upload
dferhadian Apr 30, 2020
99b2382
Create project.py
dferhadian Apr 30, 2020
815d7ad
Rename project_spring_2020/project.py to get_volumes/get_volumes.py
dferhadian May 4, 2020
d3865aa
Rename project_spring_2020/Data.csv to get_volume/Data.csv
dferhadian May 4, 2020
c257451
Rename get_volume/Data.csv to get_volumes/Data.csv
dferhadian May 4, 2020
899fe8b
Rename project_spring_2020/sample_file.py to get_volumes/sample_file.py
dferhadian May 4, 2020
c194634
Create setup.py
dferhadian May 4, 2020
015d4bb
Update setup.py
dferhadian May 4, 2020
a43858c
Rename get_volumes/Data.csv to get_volumes/Data/Data.csv
dferhadian May 4, 2020
9fdceef
Create get_volumes_test.py
dferhadian May 4, 2020
3471f2f
Update get_volumes.py
dferhadian May 4, 2020
569cf96
Update sample_test.py
dferhadian May 5, 2020
86315ec
Delete get_volumes_test.py
dferhadian May 5, 2020
7ade65b
Rename get_volumes.py to core_function.py
dferhadian May 5, 2020
56044a7
Rename get_volumes/Data/Data.csv to tests/Data/Data.csv
dferhadian May 5, 2020
5490c99
Delete sample_file.py
dferhadian May 5, 2020
a46de57
Rename sample_test.py to get_volume_test.py
dferhadian May 5, 2020
91e4b0f
Update get_volume_test.py
dferhadian May 5, 2020
a5117ed
Delete Data.csv
dferhadian May 5, 2020
8a55108
Add files via upload
dferhadian May 5, 2020
38273ed
Rename tests/Data.csv to tests/Data/Data.csv
dferhadian May 5, 2020
4e6b384
Update core_function.py
dferhadian May 5, 2020
66a35e5
Update setup.py
dferhadian May 7, 2020
877b964
Update README.md
dferhadian May 7, 2020
cd86334
Update get_volume_test.py
dferhadian May 7, 2020
5bfb141
Updated test
dferhadian May 7, 2020
2eb3454
Update setup.py
dferhadian May 7, 2020
e264f9f
Update setup.py
dferhadian May 7, 2020
1987f1b
Update setup.py
dferhadian May 8, 2020
c588ceb
fix data path
leej3 May 8, 2020
4da569c
Merge pull request #1 from leej3/path_fix
dferhadian 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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 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)

This package aims to calculate the volume of samples needed to get 700 ng of DNA after measurment of these samples using the nanodrop
The input file is a modified csv file (obtained directly fron the Nanodrop) where only the samples of interest are kept
28 changes: 28 additions & 0 deletions get_volumes/Data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
 ID,Sample Time,Type,Conc.,Units,Factor,A260 (10 mm),A280 (10 mm),A3rd (10 mm),A260/A280,BlankTime,Calibration Time,Note,Diagnostic Code
1,18/03/2020 10:42,dsDNA,10,ng/µl,50,0.199,0.121,0.036,1.64,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
2,18/03/2020 10:42,dsDNA,10.1,ng/µl,50,0.202,0.124,0.044,1.62,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
3,18/03/2020 10:43,dsDNA,12.2,ng/µl,50,0.245,0.146,0.043,1.68,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
4,18/03/2020 10:43,dsDNA,13.4,ng/µl,50,0.268,0.161,0.047,1.66,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
5,18/03/2020 10:43,dsDNA,10.8,ng/µl,50,0.216,0.145,0.018,1.49,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
6,18/03/2020 10:43,dsDNA,10.8,ng/µl,50,0.216,0.134,0.041,1.61,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
7,18/03/2020 10:44,dsDNA,13.7,ng/µl,50,0.274,0.151,0.024,1.82,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
8,18/03/2020 10:44,dsDNA,14.8,ng/µl,50,0.297,0.16,0.012,1.86,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
9,18/03/2020 10:44,dsDNA,15.3,ng/µl,50,0.306,0.172,0.014,1.78,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
10,18/03/2020 10:44,dsDNA,20.8,ng/µl,50,0.416,0.224,0.013,1.86,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
11,18/03/2020 10:45,dsDNA,7.1,ng/µl,50,0.143,0.083,0.037,1.72,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
12,18/03/2020 10:45,dsDNA,7.7,ng/µl,50,0.154,0.091,0.028,1.68,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
13,18/03/2020 10:45,dsDNA,9.5,ng/µl,50,0.19,0.132,0.086,1.43,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
14,18/03/2020 10:46,dsDNA,8.9,ng/µl,50,0.177,0.104,0.011,1.71,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
15,18/03/2020 10:46,dsDNA,8.1,ng/µl,50,0.162,0.081,-0.031,2.01,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
16,18/03/2020 10:46,dsDNA,10.2,ng/µl,50,0.204,0.128,0.016,1.6,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
17,18/03/2020 10:46,dsDNA,10.4,ng/µl,50,0.207,0.136,0.048,1.53,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
18,18/03/2020 10:46,dsDNA,4.7,ng/µl,50,0.093,0.09,-0.432,1.03,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
19,18/03/2020 10:47,dsDNA,12,ng/µl,50,0.24,0.131,0.012,1.83,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
20,18/03/2020 10:47,dsDNA,15.3,ng/µl,50,0.305,0.168,0.031,1.82,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
,18/03/2020 10:47,Blank,,,,,,,,,01/01/2010 00:00,,0x00000000
21,18/03/2020 10:48,dsDNA,775,ng/µl,50,15.499,8.283,0.031,1.87,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
22,18/03/2020 10:48,dsDNA,777.4,ng/µl,50,15.548,8.308,0.034,1.87,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
23,18/03/2020 10:48,dsDNA,784.8,ng/µl,50,15.696,8.386,0.041,1.87,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
24,18/03/2020 10:48,dsDNA,1925.6,ng/µl,50,38.512,22.107,0.024,1.74,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
25,18/03/2020 10:48,dsDNA,1916.3,ng/µl,50,38.327,21.934,0.022,1.75,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
26,18/03/2020 10:48,dsDNA,1925.8,ng/µl,50,38.516,22.093,0.023,1.74,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
Empty file added get_volumes/__init__.py
Empty file.
9 changes: 9 additions & 0 deletions get_volumes/core_function.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pandas as pd
def get_volumes(input):
data = pd.read_csv(input) #if UnicodeDecodeError open csv file in Sublime Text and Save with UTF-8 encoding
data.head()
clean_data = data.copy()[['Sample Time','Type', 'Conc.']]
clean_data.head()
clean_data["Volume"] = 700/clean_data["Conc."]
clean_data.head()
return clean_data
1 change: 0 additions & 1 deletion project_spring_2020/sample_file.py

This file was deleted.

25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import setuptools
from pathlib import Path

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

setuptools.setup(
name="get_volumes",
version="0.0.1",
author="Damien Ferhadian",
author_email="[email protected]",
description="Calculate the volume of sample needed to get a certain amount of DNA to do a qPCR after Nanodrop measurement",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/dferhadian/-project_spring_2020/tree/master/get_volumes",
packages=setuptools.find_packages(),
scripts = ['get_volumes/core_function.py'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',

)
28 changes: 28 additions & 0 deletions tests/Data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
 ID,Sample Time,Type,Conc.,Units,Factor,A260 (10 mm),A280 (10 mm),A3rd (10 mm),A260/A280,BlankTime,Calibration Time,Note,Diagnostic Code
1,18/03/2020 10:42,dsDNA,10,ng/µl,50,0.199,0.121,0.036,1.64,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
2,18/03/2020 10:42,dsDNA,10.1,ng/µl,50,0.202,0.124,0.044,1.62,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
3,18/03/2020 10:43,dsDNA,12.2,ng/µl,50,0.245,0.146,0.043,1.68,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
4,18/03/2020 10:43,dsDNA,13.4,ng/µl,50,0.268,0.161,0.047,1.66,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
5,18/03/2020 10:43,dsDNA,10.8,ng/µl,50,0.216,0.145,0.018,1.49,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
6,18/03/2020 10:43,dsDNA,10.8,ng/µl,50,0.216,0.134,0.041,1.61,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
7,18/03/2020 10:44,dsDNA,13.7,ng/µl,50,0.274,0.151,0.024,1.82,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
8,18/03/2020 10:44,dsDNA,14.8,ng/µl,50,0.297,0.16,0.012,1.86,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
9,18/03/2020 10:44,dsDNA,15.3,ng/µl,50,0.306,0.172,0.014,1.78,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
10,18/03/2020 10:44,dsDNA,20.8,ng/µl,50,0.416,0.224,0.013,1.86,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
11,18/03/2020 10:45,dsDNA,7.1,ng/µl,50,0.143,0.083,0.037,1.72,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
12,18/03/2020 10:45,dsDNA,7.7,ng/µl,50,0.154,0.091,0.028,1.68,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
13,18/03/2020 10:45,dsDNA,9.5,ng/µl,50,0.19,0.132,0.086,1.43,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
14,18/03/2020 10:46,dsDNA,8.9,ng/µl,50,0.177,0.104,0.011,1.71,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
15,18/03/2020 10:46,dsDNA,8.1,ng/µl,50,0.162,0.081,-0.031,2.01,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
16,18/03/2020 10:46,dsDNA,10.2,ng/µl,50,0.204,0.128,0.016,1.6,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
17,18/03/2020 10:46,dsDNA,10.4,ng/µl,50,0.207,0.136,0.048,1.53,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
18,18/03/2020 10:46,dsDNA,4.7,ng/µl,50,0.093,0.09,-0.432,1.03,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
19,18/03/2020 10:47,dsDNA,12,ng/µl,50,0.24,0.131,0.012,1.83,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
20,18/03/2020 10:47,dsDNA,15.3,ng/µl,50,0.305,0.168,0.031,1.82,18/03/2020 10:42,01/01/2010 00:00,,0x00000000
,18/03/2020 10:47,Blank,,,,,,,,,01/01/2010 00:00,,0x00000000
21,18/03/2020 10:48,dsDNA,775,ng/µl,50,15.499,8.283,0.031,1.87,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
22,18/03/2020 10:48,dsDNA,777.4,ng/µl,50,15.548,8.308,0.034,1.87,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
23,18/03/2020 10:48,dsDNA,784.8,ng/µl,50,15.696,8.386,0.041,1.87,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
24,18/03/2020 10:48,dsDNA,1925.6,ng/µl,50,38.512,22.107,0.024,1.74,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
25,18/03/2020 10:48,dsDNA,1916.3,ng/µl,50,38.327,21.934,0.022,1.75,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
26,18/03/2020 10:48,dsDNA,1925.8,ng/µl,50,38.516,22.093,0.023,1.74,18/03/2020 10:47,01/01/2010 00:00,,0x00000000
Empty file added tests/__init__.py
Empty file.
12 changes: 12 additions & 0 deletions tests/get_volume_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pandas as pd
from get_volumes import core_function
from pathlib import Path

tests_dir = Path(__file__).parent
DATAPATH = tests_dir / 'Data.csv'
def test_get_volumes():
expected = pd.DataFrame({"Conc.":[10.0,10.1,12.2],'Volume':[70,69.3,57.38]})

result = core_function.get_volumes(DATAPATH)
assert (result.head(3)["Conc."].round(1) == expected["Conc."].round(1)).all
assert (result.head(3)["Volume"].round(0) == expected["Volume"].round(0)).all
9 changes: 0 additions & 9 deletions tests/sample_test.py

This file was deleted.