EC2 Default User commited on
Commit
7304bbb
1 Parent(s): d786e35
oas-paired-sequence-data.py CHANGED
@@ -50,7 +50,7 @@ class OasPairedSequenceData(datasets.GeneratorBasedBuilder):
50
 
51
  VERSION = datasets.Version("1.2.0")
52
  BUILDER_CONFIGS = [
53
- # datasets.BuilderConfig(name="human", version=VERSION, description="Human"),
54
  datasets.BuilderConfig(name="rat_SD", version=VERSION, description="rat_SD"),
55
  datasets.BuilderConfig(
56
  name="mouse_BALB_c", version=VERSION, description="mouse_BALB_c"
 
50
 
51
  VERSION = datasets.Version("1.2.0")
52
  BUILDER_CONFIGS = [
53
+ datasets.BuilderConfig(name="human", version=VERSION, description="human"),
54
  datasets.BuilderConfig(name="rat_SD", version=VERSION, description="rat_SD"),
55
  datasets.BuilderConfig(
56
  name="mouse_BALB_c", version=VERSION, description="mouse_BALB_c"
src/oas-data-cleaning.py CHANGED
@@ -53,19 +53,18 @@ for species in species_list:
53
  print(f"{species} output summary:")
54
  print(species_df.head())
55
  print(species_df.shape)
56
- parquet_dir = os.path.join(output_path, species)
57
- os.makedirs(parquet_dir, exist_ok=True)
58
- species_df.to_parquet(parquet_dir, partition_cols=["data_unit"])
59
  zip_name = species + ".tar.gz"
60
  print(f"Creating {zip_name}")
61
  with tarfile.open(zip_name, "w:gz") as tf:
62
- tf.add(parquet_dir)
63
  print(
64
  f"Uploading {zip_name} to {os.path.join('s3://', S3_BUCKET, S3_DEST_PREFIX)}"
65
  )
66
  s3.upload_file(zip_name, S3_BUCKET, os.path.join(S3_DEST_PREFIX, zip_name))
67
- print(f"Removing {parquet_dir}")
68
- shutil.rmtree(parquet_dir)
69
  print(f"Removing {zip_name}")
70
  os.remove(zip_name)
71
 
 
53
  print(f"{species} output summary:")
54
  print(species_df.head())
55
  print(species_df.shape)
56
+ os.makedirs(species, exist_ok=True)
57
+ species_df.to_parquet(species, partition_cols=["data_unit"])
 
58
  zip_name = species + ".tar.gz"
59
  print(f"Creating {zip_name}")
60
  with tarfile.open(zip_name, "w:gz") as tf:
61
+ tf.add(species, arcname="")
62
  print(
63
  f"Uploading {zip_name} to {os.path.join('s3://', S3_BUCKET, S3_DEST_PREFIX)}"
64
  )
65
  s3.upload_file(zip_name, S3_BUCKET, os.path.join(S3_DEST_PREFIX, zip_name))
66
+ print(f"Removing {species}")
67
+ shutil.rmtree(species)
68
  print(f"Removing {zip_name}")
69
  os.remove(zip_name)
70