File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use gen::config;
4
4
use gen:: config:: { get_gen_dir, get_operation_connection} ;
5
5
6
6
use gen:: annotations:: gff:: propagate_gff;
7
+ use gen:: diffs:: gfa:: gfa_sample_diff;
7
8
use gen:: exports:: fasta:: export_fasta;
8
9
use gen:: exports:: genbank:: export_genbank;
9
10
use gen:: exports:: gfa:: export_gfa;
@@ -319,6 +320,21 @@ enum Commands {
319
320
#[ arg( long) ]
320
321
region : Option < String > ,
321
322
} ,
323
+ /// Output a file representing the "diff" between two samples
324
+ Diff {
325
+ /// The name of the collection to diff
326
+ #[ arg( short, long) ]
327
+ name : Option < String > ,
328
+ /// The name of the first sample to diff
329
+ #[ arg( long) ]
330
+ sample1 : Option < String > ,
331
+ /// The name of the second sample to diff
332
+ #[ arg( long) ]
333
+ sample2 : Option < String > ,
334
+ /// The name of the output GFA file
335
+ #[ arg( long) ]
336
+ gfa : String ,
337
+ } ,
322
338
}
323
339
324
340
fn main ( ) {
@@ -914,5 +930,22 @@ fn main() {
914
930
& sequence[ start_coordinate as usize ..end_coordinate as usize ]
915
931
) ;
916
932
}
933
+ Some ( Commands :: Diff {
934
+ name,
935
+ sample1,
936
+ sample2,
937
+ gfa,
938
+ } ) => {
939
+ let name = & name
940
+ . clone ( )
941
+ . unwrap_or_else ( || get_default_collection ( & operation_conn) ) ;
942
+ gfa_sample_diff (
943
+ & conn,
944
+ name,
945
+ & PathBuf :: from ( gfa) ,
946
+ sample1. as_deref ( ) ,
947
+ sample2. as_deref ( ) ,
948
+ ) ;
949
+ }
917
950
}
918
951
}
You can’t perform that action at this time.
0 commit comments