Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f690c08
using queue before change to list
sierra-alpha Dec 14, 2018
505e3ed
first test
sierra-alpha Dec 14, 2018
11c33a7
Compiled ok (WTF?) but getting segmentation fault, working on that now
sierra-alpha Dec 14, 2018
24c19e3
input now working correctly, just need to work on output and an infin…
sierra-alpha Dec 14, 2018
ec16469
Finished with basic test need to run on full data set
sierra-alpha Dec 15, 2018
11735db
Tested with limited sample set, will merge to master, needs a full da…
sierra-alpha Dec 15, 2018
291f37b
Create README.md
sierra-alpha Dec 15, 2018
af8b853
Working with '\t' delim, now making code take any input and any delim
sierra-alpha Dec 15, 2018
12b6660
Working and tested, verbose option could be implemented better but wo…
sierra-alpha Dec 15, 2018
3d905bf
figured out .gitignore
sierra-alpha Dec 15, 2018
fead8da
figured out .gitignore
sierra-alpha Dec 15, 2018
00a74d1
removed cached sample files .stru and .txt
sierra-alpha Dec 15, 2018
e323010
Fixed memory Leak, before change to csv output
sierra-alpha Dec 15, 2018
e957183
put the samples on the heap, changed to csv output
sierra-alpha Dec 15, 2018
99f5976
initial multithreading branch
sierra-alpha Jul 12, 2019
d854542
read in multithreaded not tested
sierra-alpha Jul 15, 2019
35f4d58
threads made for reading in and tested
sierra-alpha Jul 15, 2019
7776c72
linked list double access causing segmentation fault
sierra-alpha Jul 16, 2019
f33ac7c
lost can't figure it out, thinking of opening up Node Structure
sierra-alpha Jul 16, 2019
2f7aa17
before deleting template
sierra-alpha Jul 16, 2019
ee61854
Multithreading complete and tested
sierra-alpha Jul 18, 2019
522cf49
tidy up code as per codacy comments
sierra-alpha Jul 18, 2019
e593d3b
tested and working
sierra-alpha Jul 18, 2019
70468eb
command line args finished, just requires documentation now
sierra-alpha Jul 18, 2019
54cbff5
memory management finalised
sierra-alpha Jul 19, 2019
178a54d
before code cleanup and commenting
sierra-alpha Jul 19, 2019
c4250e5
documented code and some optimisation
sierra-alpha Jul 19, 2019
4cd9110
removed .o file and executable
sierra-alpha Jul 19, 2019
9a7eac7
Update README.md
sierra-alpha Jul 19, 2019
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 .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.txt
*.stru
*.csv
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.associations": {
"istream": "cpp",
"iostream": "cpp"
}
}
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SNP_comparisons
Calculating numbers of mismatching loci based on structure files, using multithreading so its really fast.

An example of the speedup for a .stru that was 600+ lines long outputing 50000+ results
R = 45mins
- [ ] [@laninsky]( https://github.com/laninsky ) to confirm
Cpp (Single Thread) = 15mins
Cpp (Multi Threaded) = 1min 35secs

## Contents:

- [SNP_comparisons](#snp_comparisons)
* [Contents](#contents)
* [What](#what)
* [Why](#why)
* [How Does it Work](#how-does-it-work)
* [How Do I Use It](#how-do-i-use-it)
* [R integration](#r-integration)

## What

SnipIt is a program written to help genetiscists compare locii matches and mismatches between different samples.
- [ ] [@laninsky]( https://github.com/laninsky ) to explain more here

Currently only supports Unix like operating systems

## Why

- [ ] [@laninsky]( https://github.com/laninsky ) also to explain more here

## How Does it Work?

### SnipIt
Uses multiple threads to read in the structure files into memory, once these are read in it again uses multiple threads to run through the different combinations of pairs of samples to compare their locii matches or different mismatches. It then writes this to a .CSV for use in other applications as required.

## How Do I Use It?

### SnipIt

1. You need to be using a Unix based machine (if you want a windows support let me [@Sierra-Alpha]( https://github.com/Sierra-Alpha ) know)

2. You need a cpp compiler probably gnu gcc available here: https://gcc.gnu.org/

3. Download the SnipIt.cpp and makefile from this repository into the folder where you want it to live

4. Using your terminal navigate to that folder and simply type `make`

5. Easiest is to operate from that folder and copy in the stru file you want to use or alternativly call the program with the path to your structure file then type:

`./SnipIt <input_filename> <lowest_allele> <delim_character>`

###### `<input_filename>`
The name of the structure file to be read in and snipped, include the path if it is not in the same directory.
###### `<lowest_allele>`
Specify the lowest number used to represent an allele, this program assumes they are represented by 4 consecutive numbers, any number outside this are considered a non sample.
###### `<delim_characters>`
The character used to delimit samples in the stru file, use \\t or \\s for tab and space respectivly.

6. Checkout your results at `<input_filename>`Snipped.csv at either the folder SnipIt is in or at the location of your path to `<input_filename>`


## R integration

- [ ] [@laninsky]( https://github.com/laninsky ) to figure out and document here
Loading