Skip to content

Commit

Permalink
Merge pull request #170 from broadinstitute/ps-release-2024-sept
Browse files Browse the repository at this point in the history
Release (september 2024)
  • Loading branch information
psmadbec authored Oct 8, 2024
2 parents 4a0105a + 5ae402a commit 65bfb86
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bioindex/src/main/resources/singleCellMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
def download_data():
out = []
cmd = 'aws s3 cp s3://dig-analysis-data/single_cell/ ./data/ ' \
'--recursive --exclude="*" --include="*dataset_metadata"'
'--recursive --exclude="*" --include="*dataset_metadata.json"'
subprocess.check_call(cmd, shell=True)
for file in glob.glob('data/*/dataset_metadata'):
for file in glob.glob('data/*/dataset_metadata.json'):
with open(file, 'r') as f:
out.append(json.load(f))
return out
Expand Down
2 changes: 1 addition & 1 deletion bioindex/src/main/scala/SingleCellMetadataStage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.broadinstitute.dig.aws.emr._
class SingleCellMetadataStage(implicit context: Context) extends Stage {
import MemorySize.Implicits._

val metadata: Input.Source = Input.Source.Raw("single_cell/*/dataset_metadata")
val metadata: Input.Source = Input.Source.Raw("single_cell/*/dataset_metadata.json")

override val cluster: ClusterDef = super.cluster.copy(
instances = 1,
Expand Down
2 changes: 1 addition & 1 deletion bottom-line/src/main/resources/runMinP.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def min_p(df):


def num_dataset(phenotype, ancestry):
path = f'{s3dir}/out/metaanalysis/variants/{phenotype}/'
path = f'{s3_in}/out/metaanalysis/variants/{phenotype}/'
files = subprocess.check_output(['aws', 's3', 'ls', path, '--recursive']).decode().strip().split('\n')
datasets = set()
for file in files:
Expand Down
1 change: 1 addition & 0 deletions bottom-line/src/main/resources/runNaive.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def naive(df):
df = df \
.withColumn('weight', 1.0 / df.stdErr / df.stdErr) \
.withColumn('weighted_beta', df.beta / df.stdErr / df.stdErr)
df = df.filter(~df.weight.isNull())
df = df \
.groupBy(df.varId, df.chromosome, df.position, df.reference, df.alt, df.phenotype, df.ancestry) \
.agg({'weight': 'sum', 'weighted_beta': 'sum', 'n': 'sum'})
Expand Down
3 changes: 1 addition & 2 deletions bottom-line/src/main/scala/ClumpedAssociationsStage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class ClumpedAssociationsStage(implicit context: Context) extends Stage {

/** Simple cluster with more memory. */
override val cluster: ClusterDef = super.cluster.copy(
masterInstanceType = Strategy.generalPurpose(mem = 64.gb),
instances = 1
instances = 5
)

/** Build the job. */
Expand Down

0 comments on commit 65bfb86

Please sign in to comment.