Skip to content

Commit

Permalink
Merge pull request #3 from mklarqvist/build-dev
Browse files Browse the repository at this point in the history
Major updates for build process; filtering and slicing
  • Loading branch information
mklarqvist authored Jul 12, 2018
2 parents c655998 + 833041a commit feaf3dc
Show file tree
Hide file tree
Showing 49 changed files with 2,551 additions and 1,688 deletions.
2 changes: 1 addition & 1 deletion .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<option id="cdt.managedbuild.option.gnu.cross.prefix.639451169" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false"/>
<option id="cdt.managedbuild.option.gnu.cross.path.1512816234" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1350459350" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/Tachyon}/build" id="cdt.managedbuild.builder.gnu.cross.1750567232" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<builder buildPath="${workspace_loc:/Tachyon}" id="cdt.managedbuild.builder.gnu.cross.1750567232" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.773076487" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option id="gnu.c.compiler.option.optimization.level.1087624297" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.c.optimization.level.most" valueType="enumerated"/>
<option id="gnu.c.compiler.option.dialect.std.752679132" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.c99" valueType="enumerated"/>
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@
*.app
bin/
**/.DS_Store

# Externals
openssl/
zstd/
73 changes: 49 additions & 24 deletions .settings/language.settings.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.340329375" name="build">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1364303945936347282" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.340329375.140199204" name="library">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1364303945936347282" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>

<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.340329375" name="build">

<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">

<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>

<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>

<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>

<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1873167801090117660" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">

<language-scope id="org.eclipse.cdt.core.gcc"/>

<language-scope id="org.eclipse.cdt.core.g++"/>

</provider>

<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>

</extension>

</configuration>

<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.340329375.140199204" name="library">

<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">

<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>

<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>

<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>

<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1873167801090117660" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">

<language-scope id="org.eclipse.cdt.core.gcc"/>

<language-scope id="org.eclipse.cdt.core.g++"/>

</provider>

<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>

</extension>

</configuration>

</project>
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,8 @@ before_install:
- cd ..
script:
- git submodule update --recursive
- make -j4
- make examples
- cd lib/third_party/zlib
- ./configure
- cd ../../../
- make -j 4

34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>

# Exploring population-scale sequence variant data
Tachyon, or `YON` for short, is an open source software library for storing and rapidly querying sequence variant data in an (optionally) lossless and bit-exact representation. It was developed with a focus on enabling fast experimentation and storage of population-scaled datasets. We have benchmarked Tachyon on population-scaled datasets up to 10 million whole-genome sequenced individuals (see [benchmarks](BENCHMARKS.md)). Most genotype-specific algorithms were originally developed for [Tomahawk][tomahawk] for the purpose of calculating all-vs-all linkage-disequilibrium and identity-by-state in large-scale cohorts.
Tachyon, or `YON` for short, is an open source software library for storing and rapidly querying sequence variant data in an (optionally) lossless and bit-exact representation. It is completely compatible with BCF/VCF. It was developed with a focus on enabling fast experimentation and storage of population-scaled datasets. We have benchmarked Tachyon on population-scaled datasets up to 10 million whole-genome sequenced individuals (see [benchmarks](docs/benchmarks.md)). Tachyon grew out of the [Tomahawk][tomahawk] project for calculating genome-wide linkage-disequilibrium.

## Highlights of Tachyon
* **Self-indexing**: Tachyon always builds the best possible quad-tree, linear, and meta-index given the input data (irrespective of sorting). There are no external indices as data are stored in the file itself.
Expand Down Expand Up @@ -56,25 +56,49 @@ You will need to have installed the following dependencies:
* [openssl][openssl]: An open-source library for encryption/decryption

### Building from source
If the required dependencies listed above are installed then building is trivial. Note the added `--recursive` flag to the clone request. This flag is required to additionally clone the latest third-party dependencies.
If the required external dependencies listed above are installed then building is trivial. Note the added `--recursive` flag to the clone request. This flag is required to additionally pull down the latest third-party dependencies.
```bash
git clone --recursive https://github.com/mklarqvist/tachyon
cd tachyon
make
```
Tachyon comes bundled with several API-examples in the `lib_example` directory. Build them with
Tachyon comes bundled with several API-examples in the `lib_example` directory. They are built by default but should you want to rebuild them execute the command:
```bash
make examples
```

If you have no super-user powers required to install software on your machine:
```
### Building without admin privilidges
If you have no super-user (`sudo`) powers required to install software on your machine:

### Linux/MacOSX
```bash
git clone --recursive https://github.com/mklarqvist/tachyon
cd tachyon
# If you do NOT have ZSTD available
git clone https://github.com/facebook/zstd
cd zstd
make
cd ..
# If you do NOT have OpenSSL installed
git clone git://git.openssl.org/openssl.git
cd openssl
./config
make
cd ..
# Build Tachyon
make
```
### MacOSX
Installation using [Homebrew](https://brew.sh/):
```bash
brew update
# If you do NOT have OpenSSL installed
brew install openssl
# If you do NOT have ZSTD installed
brew install zstd
# Install Tachyon
git clone --recursive https://github.com/mklarqvist/tachyon
cd tachyon
make
```

Expand Down
File renamed without changes.
110 changes: 110 additions & 0 deletions lib/containers/components/data_container_header_object.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#include "data_container_header_object.h"

namespace tachyon{
namespace containers{

DataContainerHeaderObject::DataContainerHeaderObject() :
stride(1),
offset(0),
cLength(0),
uLength(0),
eLength(0),
crc(0),
global_key(-1)
{}

DataContainerHeaderObject::DataContainerHeaderObject(const DataContainerHeaderObject& other) :
controller(other.controller),
stride(other.stride),
offset(other.offset),
cLength(other.cLength),
uLength(other.uLength),
eLength(other.eLength),
crc(other.crc),
global_key(other.global_key)
{
}

DataContainerHeaderObject::DataContainerHeaderObject(DataContainerHeaderObject&& other) noexcept :
controller(other.controller),
stride(other.stride),
offset(other.offset),
cLength(other.cLength),
uLength(other.uLength),
eLength(other.eLength),
crc(other.crc),
global_key(other.global_key)
{

}

// copy assignment
DataContainerHeaderObject& DataContainerHeaderObject::operator=(const DataContainerHeaderObject& other){
this->controller = other.controller;
this->stride = other.stride;
this->offset = other.offset;
this->cLength = other.cLength;
this->uLength = other.uLength;
this->eLength = other.eLength;
this->crc = other.crc;
this->global_key = other.global_key;
return *this;
}


/** Move assignment operator */
DataContainerHeaderObject& DataContainerHeaderObject::operator=(DataContainerHeaderObject&& other) noexcept{
this->controller = other.controller;
this->stride = other.stride;
this->offset = other.offset;
this->cLength = other.cLength;
this->uLength = other.uLength;
this->eLength = other.eLength;
this->crc = other.crc;
this->global_key = other.global_key;
return *this;
}

DataContainerHeaderObject::~DataContainerHeaderObject(){ }

void DataContainerHeaderObject::reset(void){
this->controller.clear();
this->stride = 1;
this->offset = 0;
this->cLength = 0;
this->uLength = 0;
this->crc = 0;
this->global_key = -1;
}

const bool DataContainerHeaderObject::operator==(const self_type& other) const{
if(this->stride != other.stride) return false;
if(this->offset != other.offset) return false;
if(this->cLength != other.cLength) return false;
if(this->uLength != other.uLength) return false;
if(this->eLength != other.eLength) return false;
if(this->crc != other.crc) return false;
if(this->global_key != other.global_key) return false;
if(this->controller != other.controller) return false;
return true;
}

const SBYTE DataContainerHeaderObject::getPrimitiveWidth(void) const{
// We do not care about signedness here
switch(this->controller.type){
case(YON_TYPE_UNKNOWN):
case(YON_TYPE_STRUCT): return(-1);
case(YON_TYPE_BOOLEAN):
case(YON_TYPE_CHAR): return(sizeof(char));
case(YON_TYPE_8B): return(sizeof(BYTE));
case(YON_TYPE_16B): return(sizeof(U16));
case(YON_TYPE_32B): return(sizeof(U32));
case(YON_TYPE_64B): return(sizeof(U64));
case(YON_TYPE_FLOAT): return(sizeof(float));
case(YON_TYPE_DOUBLE): return(sizeof(double));
}
return 0;
}

}
}
Loading

0 comments on commit feaf3dc

Please # to comment.