Skip to content

Commit

Permalink
Merge pull request #5 from platforma-open/use-software-package
Browse files Browse the repository at this point in the history
use software packages for STAR and subread
  • Loading branch information
aiturbidemil authored Nov 15, 2024
2 parents b8cad40 + aa4d10c commit a07f0c0
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-genome-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:
branches:
- "main"
paths:
- "genomeFiles/**"
- "genomeFiles/package.json"
- ".github/workflows/build-genome-assets.yaml"

push:
branches:
- "main"
paths:
- "genomeFiles/**"
- "genomeFiles/package.json"
- ".github/workflows/build-genome-assets.yaml"

workflow_dispatch: {}
Expand Down
34 changes: 28 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ catalog:
'@milaboratories/graph-maker': ^1.0.21
'@milaboratories/software-pframes-conv': ^1.6.4
'@platforma-open/milaboratories.software-small-binaries': ^1.13.1
'@platforma-open/milaboratories.star-read-mapping.genome-asset': ^1.0.5
'@platforma-open/milaboratories.software-subread': ^1.0.0
'@platforma-open/milaboratories.software-star': ^1.0.1
'@platforma-open/milaboratories.star-read-mapping.genome-asset': ^1.1.2

'@ag-grid-community/core': ^32.2.2
'@ag-grid-community/client-side-row-model': ^32.2.2
Expand Down
4 changes: 3 additions & 1 deletion workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"@platforma-sdk/workflow-tengo": "catalog:",
"@milaboratories/software-pframes-conv": "catalog:",
"@platforma-open/milaboratories.software-small-binaries": "catalog:",
"@platforma-open/milaboratories.software-star": "catalog:",
"@platforma-open/milaboratories.software-subread": "catalog:",
"@platforma-open/milaboratories.star-read-mapping.genome-asset": "catalog:"
}
}
}
10 changes: 5 additions & 5 deletions workflow/src/genomeAssets.lib.tengo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
getGenomeAsset := func(species) {
yeastAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:saccharomyces-cerevisiae")
// humanAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:homo-sapiens")
// mouseAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:mus-musculus")
mouseAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:mus-musculus")
// ratAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:rattus-norvegicus")
// zebrafishAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:danio-rerio")
// fruitFlyAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:drosophila-melanogaster")
Expand All @@ -14,10 +14,10 @@ getGenomeAsset := func(species) {
// cowAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:bos-taurus")
// pigAssets := assets.importAsset("@platforma-open/milaboratories.star-read-mapping.genome-asset:sus_scrofa")

GenomeAssetsMap := {
"saccharomyces-cerevisiae": yeastAssets//,
GenomeAssetsMap := ll.toStrict({
"saccharomyces-cerevisiae": yeastAssets,
// "homo-sapiens": humanAssets,
// "mus-musculus": mouseAssets,
"mus-musculus": mouseAssets//,
// "rattus-norvegicus": ratAssets,
// "danio-rerio": zebrafishAssets,
// "drosophila-melanogaster": fruitFlyAssets,
Expand All @@ -26,7 +26,7 @@ getGenomeAsset := func(species) {
// "gallus-gallus": chickenAssets,
// "bos-taurus": cowAssets,
// "sus_scrofa": pigAssets
}
})

genomeAssets := GenomeAssetsMap[species]

Expand Down
4 changes: 2 additions & 2 deletions workflow/src/star-alignment.tpl.tengo
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ self.body(func(inputs) {
genomeAssets := genomeAssetsLib.getGenomeAsset(species)

star:= exec.builder().
cmd("STAR").
software(assets.importSoftware("@platforma-open/milaboratories.software-star:star")).
mkDir("genomeIndex").
addAsset(genomeAssets, "genomeIndex", ["chrLength.txt"]).
addAsset(genomeAssets, "genomeIndex", ["chrName.txt"]).
Expand Down Expand Up @@ -92,7 +92,7 @@ genomeAssets := genomeAssetsLib.getGenomeAsset(species)

// Calculate counts from BAM file
featureCounts:= exec.builder().
cmd("featureCounts").
software(assets.importSoftware("@platforma-open/milaboratories.software-subread:featureCounts")).
addFile("sample_Aligned.sortedByCoord.out.bam", bamFile).
addAsset(genomeAssets, ".", ["annotations.gtf"]).
arg("-t").arg("exon").
Expand Down

0 comments on commit a07f0c0

Please sign in to comment.