@@ -14,7 +14,7 @@ public class ParseInput
1414 /// <summary>
1515 /// The RAW folder path.
1616 /// </summary>
17- public string RawDirectoryPath { get ; }
17+ public string RawDirectoryPath { get ; set ; }
1818
1919 public string RawFilePath
2020 {
@@ -34,50 +34,50 @@ public string RawFilePath
3434 /// <summary>
3535 /// The output directory.
3636 /// </summary>
37- public string OutputDirectory { get ; }
37+ public string OutputDirectory { get ; set ; }
3838
3939 /// <summary>
4040 /// The output file.
4141 /// </summary>>
42- public string OutputFile { get ; }
42+ public string OutputFile { get ; set ; }
4343
4444 /// <summary>
4545 /// The output format.
4646 /// </summary>
47- public OutputFormat OutputFormat { get ; }
47+ public OutputFormat OutputFormat { get ; set ; }
4848
4949 /// <summary>
50- /// Output the metadata.
50+ /// The metadata output format .
5151 /// </summary>
52- public MetadataFormat OutputMetadata { get ; }
52+ public MetadataFormat MetadataFormat { get ; set ; }
5353
5454 /// <summary>
5555 /// The metadata output file.
5656 /// </summary>>
57- public string MetadataOutputFile { get ; }
57+ public string MetadataOutputFile { get ; set ; }
5858
5959 /// <summary>
6060 /// Gzip the output file.
6161 /// </summary>
62- public bool Gzip { get ; }
62+ public bool Gzip { get ; set ; }
6363
64- public bool NoPeakPicking { get ; }
64+ public bool NoPeakPicking { get ; set ; }
6565
66- public bool NoZlibCompression { get ; }
66+ public bool NoZlibCompression { get ; set ; }
6767
68- public LogFormat LogFormat { get ; }
68+ public LogFormat LogFormat { get ; set ; }
6969
70- public bool IgnoreInstrumentErrors { get ; }
70+ public bool IgnoreInstrumentErrors { get ; set ; }
7171
7272 private S3Loader S3Loader { get ; set ; }
7373
74- private string S3AccessKeyId { get ; }
74+ public string S3AccessKeyId { get ; set ; }
7575
76- private string S3SecretAccessKey { get ; }
76+ public string S3SecretAccessKey { get ; set ; }
7777
78- private string S3url { get ; }
78+ public string S3Url { get ; set ; }
7979
80- private readonly string bucketName ;
80+ public string BucketName { get ; set ; }
8181
8282 /// <summary>
8383 /// The raw file name.
@@ -89,76 +89,28 @@ public string RawFilePath
8989 /// </summary>
9090 public string RawFileNameWithoutExtension { get ; private set ; }
9191
92- public ParseInput ( string rawFilePath , string rawDirectoryPath , string outputDirectory , string outputFile ,
93- OutputFormat outputFormat
94- )
92+ public ParseInput ( )
9593 {
96- RawFilePath = rawFilePath ;
97- RawDirectoryPath = rawDirectoryPath ;
98- OutputDirectory = outputDirectory ;
99- OutputFile = outputFile ;
100- OutputFormat = outputFormat ;
101- OutputMetadata = MetadataFormat . NONE ;
94+ MetadataFormat = MetadataFormat . NONE ;
10295 Gzip = false ;
10396 NoPeakPicking = false ;
10497 NoZlibCompression = false ;
10598 LogFormat = LogFormat . DEFAULT ;
10699 IgnoreInstrumentErrors = false ;
107-
108- if ( S3url != null && S3AccessKeyId != null && S3SecretAccessKey != null && bucketName != null )
109- if ( Uri . IsWellFormedUriString ( S3url , UriKind . Absolute ) )
110- {
111- InitializeS3Bucket ( ) ;
112- }
113- else
114- {
115- throw new RawFileParserException ( "Invalid S3 url: " + S3url ) ;
116- }
117-
118- if ( OutputDirectory == null && OutputFile != null )
119- OutputDirectory = Path . GetDirectoryName ( OutputFile ) ;
120100 }
121101
122- public ParseInput ( string rawFilePath , string rawDirectoryPath , string outputDirectory , string outputFile ,
123- OutputFormat outputFormat , MetadataFormat outputMetadata , string metadataOutputFile , bool gzip ,
124- bool noPeakPicking , bool noZlibCompression , LogFormat logFormat , bool ignoreInstrumentErrors , string s3url ,
125- string s3AccessKeyId , string s3SecretAccessKey , string bucketName
126- )
102+ public ParseInput ( string rawFilePath , string rawDirectoryPath , string outputDirectory , OutputFormat outputFormat
103+ ) : this ( )
127104 {
128105 RawFilePath = rawFilePath ;
129106 RawDirectoryPath = rawDirectoryPath ;
130107 OutputDirectory = outputDirectory ;
131- OutputFile = outputFile ;
132108 OutputFormat = outputFormat ;
133- OutputMetadata = outputMetadata ;
134- MetadataOutputFile = metadataOutputFile ;
135- Gzip = gzip ;
136- NoPeakPicking = noPeakPicking ;
137- NoZlibCompression = noZlibCompression ;
138- LogFormat = logFormat ;
139- IgnoreInstrumentErrors = ignoreInstrumentErrors ;
140- S3url = s3url ;
141- S3AccessKeyId = s3AccessKeyId ;
142- S3SecretAccessKey = s3SecretAccessKey ;
143- this . bucketName = bucketName ;
144-
145- if ( S3url != null && S3AccessKeyId != null && S3SecretAccessKey != null && bucketName != null )
146- if ( Uri . IsWellFormedUriString ( S3url , UriKind . Absolute ) )
147- {
148- InitializeS3Bucket ( ) ;
149- }
150- else
151- {
152- throw new RawFileParserException ( "Invalid S3 url: " + S3url ) ;
153- }
154-
155- if ( OutputDirectory == null && OutputFile != null )
156- OutputDirectory = Path . GetDirectoryName ( OutputFile ) ;
157109 }
158110
159- private void InitializeS3Bucket ( )
111+ public void InitializeS3Bucket ( )
160112 {
161- S3Loader = new S3Loader ( S3url , S3AccessKeyId , S3SecretAccessKey , bucketName ) ;
113+ S3Loader = new S3Loader ( S3Url , S3AccessKeyId , S3SecretAccessKey , BucketName ) ;
162114 }
163115 }
164116}
0 commit comments