-
Couldn't load subscription status.
- Fork 97
Feature/scala code/ch02 biman (#8) #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| .DS_Store | ||
| .idea/ | ||
| build | ||
| gradle | ||
| .gradle | ||
| .idea | ||
| build | ||
| !gradle-wrapper.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
code/chap01/scala/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| .idea | ||
| .idea/ | ||
| .gradle/ | ||
| build/ |
4 changes: 4 additions & 0 deletions
code/chap02/scala/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| .idea | ||
| .idea/ | ||
| .gradle/ | ||
| build/ |
43 changes: 42 additions & 1 deletion
code/chap02/scala/README.md
100644 → 100755
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,42 @@ | ||
| Scala Solutions | ||
| # Chapter 2 | ||
|
|
||
| ## DNA-Base-Count Programs using FASTA Input Format | ||
|
|
||
| Using FASTA input files, there are 3 versions of DNA-Base-Count | ||
|
|
||
| * Version-1: | ||
| * Uses basic MapReduce programs | ||
| * Using Spark (`org.data.algorithms.spark.ch02.DNABaseCountVER1`) | ||
|
|
||
| * Version-2: | ||
| * Uses InMapper Combiner design pattern | ||
| * Using PySpark (`org.data.algorithms.spark.ch02.DNABaseCountVER2`) | ||
|
|
||
| * Version-3: | ||
| * Uses InMapper Combiner design pattern (by using mapPartitions() transformations) | ||
| * Using PySpark (`org.data.algorithms.spark.ch02.DNABaseCountVER3`) | ||
|
|
||
|
|
||
| ## DNA-Base-Count Programs using FASTQ Input Format | ||
|
|
||
| Using FASTQ input files, the following solution is available: | ||
|
|
||
| * Uses InMapper Combiner design pattern (by using mapPartitions() transformations) | ||
| * Using PySpark (`org.data.algorithms.spark.ch02.DNABaseCountFastq`) | ||
|
|
||
|
|
||
| ## FASTA Files to Test DNA-Base-Count | ||
|
|
||
| * A small sample FASTA file (`data/sample.fasta`) is provided. | ||
|
|
||
| * To test DNA-Base-Count programs with large size FASTA files, | ||
| you may download them from here: | ||
|
|
||
|
|
||
| ```` | ||
| ftp://ftp.ensembl.org/pub/release-91/fasta/homo_sapiens/dna/ | ||
|
|
||
| ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606/rs_fasta/ | ||
|
|
||
| ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz | ||
| ```` |
23 changes: 23 additions & 0 deletions
code/chap02/scala/build.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apply plugin: 'scala' | ||
| apply plugin: 'application' | ||
|
|
||
| ext.scalaClassifier = '2.13' | ||
| ext.scalaVersion = '2.13.7' | ||
|
|
||
| group 'com.spark.algos.data' | ||
| version '1.0-SNAPSHOT' | ||
|
|
||
| repositories { | ||
| mavenLocal() | ||
| mavenCentral() | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation group: "org.scala-lang", name: "scala-library", version: "2.13.7" | ||
| implementation group: "org.apache.spark", name: "spark-core_2.13", version: "3.2.0" | ||
| implementation group: "org.apache.spark", name: "spark-sql_2.13", version: "3.2.0" | ||
| } | ||
|
|
||
| application { | ||
| mainClass = project.hasProperty("mainClass") ? project.getProperty("mainClass") : "NULL" | ||
| } |
12 changes: 12 additions & 0 deletions
code/chap02/scala/data/sample.fasta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| >seq1 | ||
| cGTAaccaataaaaaaacaagcttaacctaattc | ||
| >seq2 | ||
| agcttagTTTGGatctggccgggg | ||
| >seq3 | ||
| gcggatttactcCCCCCAAAAANNaggggagagcccagataaatggagtctgtgcgtccaca | ||
| gaattcgcacca | ||
| AATAAAACCTCACCCAT | ||
| agagcccagaatttactcCCC | ||
| >seq4 | ||
| gcggatttactcaggggagagcccagGGataaatggagtctgtgcgtccaca | ||
| gaattcgcacca |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.