-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1541f4
commit 73f6404
Showing
14 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains 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,5 @@ | ||
channels: | ||
- bioconda | ||
- r | ||
dependencies: | ||
- star ==2.5.2b |
This file contains 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 @@ | ||
name: "star" | ||
description: Map reads with STAR. | ||
authors: | ||
- Johannes Köster |
This file contains 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,16 @@ | ||
rule star: | ||
input: | ||
sample=["reads/{sample}.1.fastq", "reads/{sample}.2.fastq"] | ||
output: | ||
# see STAR manual for additional output files | ||
"star/{sample}/Aligned.out.bam" | ||
log: | ||
"logs/star/{sample}.log" | ||
params: | ||
# path to STAR reference genome index | ||
index="index/", | ||
# optional parameters | ||
extra="" | ||
threads: 8 | ||
wrapper: | ||
"master/bio/star/align" |
This file contains 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,2 @@ | ||
>Sheila | ||
GCTAGCTCAGAAAAAAAAAA |
This file contains 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 @@ | ||
20 |
This file contains 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 @@ | ||
Sheila |
This file contains 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 @@ | ||
Sheila 20 |
This file contains 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,2 @@ | ||
0 | ||
262144 |
This file contains 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,14 @@ | ||
### STAR --runMode genomeGenerate --genomeDir index --genomeFastaFiles genome.fasta | ||
versionGenome 20201 | ||
genomeFastaFiles genome.fasta | ||
genomeSAindexNbases 14 | ||
genomeChrBinNbits 18 | ||
genomeSAsparseD 1 | ||
sjdbOverhang 0 | ||
sjdbFileChrStartEnd - | ||
sjdbGTFfile - | ||
sjdbGTFchrPrefix - | ||
sjdbGTFfeatureExon exon | ||
sjdbGTFtagExonParentTranscript transcript_id | ||
sjdbGTFtagExonParentGene gene_id | ||
sjdbInsertSave Basic |
This file contains 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 @@ | ||
@1 | ||
ACGGCAT | ||
+ | ||
!!!!!!! |
This file contains 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 @@ | ||
@1 | ||
ACGGCAT | ||
+ | ||
!!!!!!! |
This file contains 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,8 @@ | ||
import subprocess | ||
import os | ||
|
||
def setup_module(): | ||
os.chdir(os.path.join(os.path.dirname(__file__), "test")) | ||
|
||
def test(): | ||
subprocess.check_call(["snakemake", "mapped/a/Aligned.out.bam", "--use-conda", "-F"]) |
This file contains 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,34 @@ | ||
__author__ = "Johannes Köster" | ||
__copyright__ = "Copyright 2016, Johannes Köster" | ||
__email__ = "koester@jimmy.harvard.edu" | ||
__license__ = "MIT" | ||
|
||
|
||
import os | ||
from snakemake.shell import shell | ||
|
||
extra = snakemake.params.get("extra", "") | ||
log = snakemake.log_fmt_shell(stdout=True, stderr=True) | ||
|
||
n = len(snakemake.input.sample) | ||
assert n == 1 or n == 2, "input->sample must have 1 (single-end) or 2 (paired-end) elements." | ||
|
||
if snakemake.input.sample[0].endswith(".gz"): | ||
readcmd = "--readFilesCommand zcat" | ||
else: | ||
readcmd = "" | ||
|
||
|
||
outprefix = os.path.dirname(snakemake.output[0]) | ||
|
||
|
||
shell( | ||
"(STAR " | ||
"{snakemake.params.extra} " | ||
"--runThreadN {snakemake.threads} " | ||
"--genomeDir {snakemake.params.index} " | ||
"--readFilesIn {snakemake.input.sample} " | ||
"{readcmd} " | ||
"--outSAMtype BAM " | ||
"--outFileNamePrefix {outprefix} " | ||
"--outStd Log") |