Actions

Cough analysis

From Santa Fe Institute Events Wiki

Build environment

When you team code, it is very important that your build environment is the same for all of your developers. For those of you that know Java and the nightmare that Maven is, you will appreciate the importance of keeping your dependencies in sync and understand the horror when your build fails due to dependencies. We will be team coding on the creation of our website, which means that we all need to have the same build environment. Having the same build environment alieviates many of the headaches associated with dependencies since the environment is created once, and the coding commences in that environment.

We have found a method that allows for team coding in a build environment that can be shared among all of us. The environment depends on some tools that you may not be familiar with, so we hope you enjoy learning about them. Technology moves very fast and researchers typically do not stay up-to-date with the newest tech that tries to make your life easier. When you have students or collaborators in the future, you will be able to create an environment that ensures your code will not break due to dependencies with the following tutorial.

Technology

We will be using two pieces of technology to build the development environment, both of which are open source. We will attempt to make all of our code open source and we encourage everyone on this project to make all of their code open and accessible. The two pieces of tech you will need to download are:

Step 1

Download the appropriate app for your machine. Windows users will have to do some special configuration in order to get a command line, but you already knew that. These programs install a virtual machine that allows us to pass around the environment to any machine we want. When we go live, we will use the same technology to upload our webpage to a hosted server in the cloud.

Step 2

After installation of the programs, you will need to get the .box file we have created that contains the development environment. This file contains the following as of 2014-06-19:

Step 3

Once you have the .box file, place it anywhere on your HD that you like. Open up a terminal and navigate to where you placed the .box file and type in the command:

vagrant init

Step 4

This will create a file in the directory called Vagrantfile. We will need to modify this file in order for you to be able to see the work you have done on the webpage on your host machine, i.e. within your favorite browser as well as, allowing vagrant to know that we will be adding a specific box. Open the file in your favorite text editor and on line 22 of the Vagrantfile, you will see the following:

# config.vm.network "forwarded_port", guest: 80, host: 8080

You will uncomment this line by deleting the # symbol at the beginning of the line. Next change the 80 to 3000 and 8080 to 3000. Doing this allows you to view changes to the website on your browser. Remember, you are working in the development environment on Ubuntu. This means we need to forward the 3000 port to your host machine for viewing what you are doing on the Ubuntu environment.

On line 13, you will need to change the line from:

# config.vm.box = "base"

to:

config.vm.box = "cough"

which is the name of the .box file you received. After modifying the Vagrantfile, save and close it and return to the terminal.

Step 5

At the command line, type in:

vagrant box add cough cough.box

This command installs the development environment complete with all the add-ons that we have placed in the box. If you need to upgrade the development environment for any reason, please notify everyone that you are doing so because, this will require all of us that actively develop on the website to get a new box from you with the updates.

Step 6

After installation is complete, type vagrant up. This command starts the virtualbox environment. Once you have vagrant up and running, you will need to ssh into the virtual machine.

Step 7

Do so by typing in the terminal vagrant ssh.

Congrats, you now have a development environment setup on your machine! This took us nearly six hours to figure out how to do it so feel good that you accomplished this. Next, we will download the website code from GitHub.

Website code

The website code will be hosted on GitHub and will live on your local machine, NOT the virtual box. Nonetheless, we will push and pull from GitHub from the virtual box so that you do not have to install git on your local machine.

Group members

  • Pooya
  • Andy
  • Ells
  • Sarah
  • Nix
  • Glen

TODO

Below is a list of things that we will need to do for the project.

  • IRB approval or individual consent?
  • Website
  • Database
  • HTML5 sound collection
  • Discuss appropriate metadata collection
  • Spectrum analysis
  • Complex variable analysis?

Project narrative

We have evolved a cough mechanism in order to breakup our mucus to help our mucocilliary clearance remove the mucus for processing. Cystic fibrosis patients have more viscous mucus than healthy individuals and have an impeded mucocilliary clearance mechanism, so it is reasonable to assume that the way they cough is also impeded somehow. This project will investigate, through crowd-sourcing data, if there exists a "normal" cough by analyzing the coughs of both healthy and unhealthy patients. If there exists a normal frequency spectrum of healthy coughs, then the possibility exists that applying the "normal" cough response to cystic fibrosis patients may help them move mucus from their lungs and thus evading infection.

Introduction

Mucus is a visocoelastic material that is a line of defense to the immune system and it is the first line of defense for the lungs. If a foreign object is between 1–5 µm in aerodynamic diameter it has a high probability to reach the deep lungs. Anything smaller is typically breathed out due to its momentum within the airflow of an inhalation, i.e. it stays within a flow stream of the inhalation. If it is larger, then it has enough momentum to impact the esophagus before it reaches the lungs and is swallowed where the stomach then processes it. However, if the foreign object reaches the lungs, then it will land in the mucus that coats the airways. Defense mechanisms will then respond to the foreign object to remove it from the system before it reaches the bloodstream. If the foreign object stays within the mucus, then the lungs will move the mucus through mucocilliary clearance mechanisms. When the process of mucocilliary clearance needs help moving mucus through the lungs for processing, a cough will be issued. Since mucus is visoelastic, a sharp percussive motion can break up the mucus (i.e. a cough), which then allows the mucocilliary clearance to do its job.


Specific aims

Specific aim 1: Data analysis for this project requires a large amount of data. Collecting data from the participants in the CSSS 2014 meeting will allow us to determine the feasibility of our project, however, we will need more data in order to obtain any statistically significant results. Because of this, our first aim will be to create a working website that users can submit their cough and metadata to. The website will collect metadata about an individual as well as take a recording of the individual cough. This data will be stored in a database and any interesting results will be displayed on the site.

Specific aim 2: From the crowd sourced data, we will initially study the spectrum of each cough. While it seems reasonable that there will be differences between healthy and unhealthy lungs, there may be more complex interactions between the metadata collected and the signal analysis we do on the cough. Because of this, we will use principle component analysis and other data analysis techniques in order to determine if a significant difference between healthy and unhealthy lungs can be distinguished. If a statistical difference can be determined, we will use machine learning algorithms to create a classifier that is capable of distinguishing a healthy lung from an unhealthy lung.

Specific aim 3: If we are successful in find differences in lung types, an analysis of creating an "artificial-normal" cough will be conducted. The hope is that it leads to the advancement for treatment of chronic pulmonary diseases.

Significance

Approach

References