Skip to content

Commit

Permalink
transform-gisaid: remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
joverlee521 committed Oct 26, 2021
1 parent 7380f01 commit 9415711
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bin/transform-gisaid
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if __name__ == '__main__':
"e.g.\n\t"
"Europe/Spain/Catalunya/Mataró\tEurope/Spain/Catalunya/Mataro\n\t")
parser.add_argument("--output-metadata",
default=str( base / "data/gisaid/metadata.tsv" ),
default=str( base / "data/gisaid/metadata.tsv" ),
help="Output location of generated metadata tsv. Defaults to `data/gisaid/metadata.tsv`")
parser.add_argument("--output-fasta",
default=str( base / "data/gisaid/sequences.fasta" ) ,
Expand Down Expand Up @@ -153,30 +153,30 @@ if __name__ == '__main__':

if not args.sorted_fasta:
pipeline = pipeline | DropSequenceData()

pipeline = (
pipeline
| ExpandLocation()
| FixLabs()
| AbbreviateAuthors()
| ParsePatientAge()
| ParseSex()
| AddHardcodedMetadata()
| AddHardcodedMetadata()
)

# writing the raw metadata in a tsv file
pipeline = ( pipeline | WriteCSV(RAW_METADATA_FILENAME,
METADATA_COLUMNS ,
restval = '?' ,
extrasaction ='ignore' ,
delimiter = '\t',
pipeline = ( pipeline | WriteCSV(RAW_METADATA_FILENAME,
METADATA_COLUMNS ,
restval = '?' ,
extrasaction ='ignore' ,
delimiter = '\t',
dict_writer_kwargs = {'lineterminator': args.newline} ) )


# applying the substitution rules (temporary : writing the intermediary data to verify effect )
dict_writer_kwargs = {'lineterminator': args.newline}


pipeline = (pipeline
| ApplyUserGeoLocationSubstitutionRules(geoRules)
| MergeUserAnnotatedMetadata(annotations)
Expand Down

0 comments on commit 9415711

Please sign in to comment.