Package: badlon
BadlonInstallationBablon can be installed withpip:pipinstallbadlonNow you can run tool from any directory asbadlon.Pipeline UsageModulesBadlon includes multiple modules to process data. They can be listed with help command:$badlon--help
usage:badlon[-h]{prepare,analysis,match}...

Toolforblockbasedanalysisofbacterialpopulations.Chooseoneofavailablemodules.

positionalarguments:{prepare,analysis,match}preparePreparedraftdatasetforSibeliaZ.analysisAnalyzepan-genomeandotherblock-basedfeaturesbasedonsyntenyblocks.matchPerformsmatchingofblockandgenesbasedoncoordinates.

optionalarguments:-h,--helpshowthishelpmessageandexitHere is recommended pipeline to process data with badlon:Step 1: prepare data withPanACoTApipelineIf you have genomes in some folder calledsome_folder(one file for genome), we suggest preparing data for badlon usingPanACoTApipeline.To do so, you can use those commands:1.1 Preparing data and tables withPanACoTA preparemodule:PanACoTA prepare --norefseq --min 0 --max 1 -o 1-prepare -d some_folder --cutn 125--min 0 --max 1are used to keep all genomes, parameter can be changed depending on task as well as all other parameters;For check other parameters visitPanACoTA preparedocumentation.1.2 Annotating genomes withPanACoTA annotatemodule:PanACoTA annotate --info 1-prepare/L* -r 2-annotate -n ESCO --threads 16You can change label-n ESCOdepending on your species (ESCO is forEscherichia coli);For check parameters visitPanACoTA annotatedocumentation.1.3 Calling orthology genes usingPanACoTA pangenomemodule:PanACoTA pangenome -l 2-annotate/LSTINFO-* -n ESCO -d 2-annotate/Proteins/ -o 3-pangenomeYou can change-iwhich is minimum sequence identity to be considered in the same cluster (float between 0 and 1). Default is 0.8.For check parameters visitPanACoTA pangenomedocumentation.Step 2: Preparing data for alignment withbadlon preparemodulePrepare module is used to prepare data for using SibeliaZ package keeping all necessary information: genome labels and chromosome numbers.Parameters can be checked with help option:$badlonprepare--help
usage:badlonprepare[-h]--folderFOLDER[--contigsCONTIGS][--outputOUTPUT][--annotate_subfolderANNOTATE_SUBFOLDER][--min_lenMIN_LEN]optionalarguments:-h,--helpshowthishelpmessageandexit--contigsCONTIGS,-cCONTIGSNumberofmaximumcontigstotakefromeverygenome.Bydefault,keepsall.--outputOUTPUT,-oOUTPUTOutputfilepath.--annotate_subfolderANNOTATE_SUBFOLDER,-aANNOTATE_SUBFOLDERSubfolderofPanACoTAcontainsresultsofannotatemodule.UsedforfindingLSTINFOfile.Defaultis'2-annotate'.--min_lenMIN_LEN,-lMIN_LENMinimumcontiglength,lessthenthatvaluewillbefiltered.Defaultis1000.

Requiredarguments:--folderFOLDER,-fFOLDERFolderwithPanACoTAoutput.WillbeusedtosearchgenomefilesbasedonLSTINFOfilefromannotatemodule.Example command:badlon prepare -f 2-annotate -o for_sibeliaz.fnaStep 3: Obtaining blocks withSibeliaZ3.1 Running SibeliaZ with recommended command based onbadlon prepareoutput.Example:sibeliaz -k 15 -a 100 -n -t 32 -o sibeliaz_out for_sibeliaz.fnaWatch out-ait needs to be equal aroundnumber_of_genome * 20,badlon preparecalculates it automatically.3.2 Obtaining blocks from alignmentCheck recommended command frombadlon preparemodule output. Usually it's (blocks minimal size 3000):cdsibeliaz_outecho$'30 150\n100 500\n500 1500'>fine.txt
maf2synteny-sfine.txt-b3000blocks_coords.gffStep 4: Calculating block based statistics and charts withbadlon analysismodule:Parameters can be checked with help option:$badlonanalysis--help
usage:badlonanalysis[-h]--blocks_fileBLOCKS_FILE--type{chr,contig}[--outputOUTPUT]optionalarguments:-h,--helpshowthishelpmessageandexit--outputOUTPUT,-oOUTPUTPathtooutputfolder.Default:blockomics_output.

Requiredarguments:--blocks_fileBLOCKS_FILE,-bBLOCKS_FILEBlocksresultedasoutputoforiginalSibeliaormaf2syntenytool.Usuallyit'ssibeliaz_out/3000/block_coords.txt file.--type {chr,contig}, -t {chr,contig}Type of genome assembly, either 'chr' or 'contig'Example command:cd..
badlonanalysis-bsibeliaz_out/3000/blocks_coords.txtStep 5 (optional): Match block and genes annotation withbadlon matchmoduleParameters can be checked with help option:$badlonmatch--help
usage:badlonmatch[-h]--blocks_fileBLOCKS_FILE--annotated_folderANNOTATED_FOLDER--pangenome_filePANGENOME_FILE--type{chr,contig}[--outputOUTPUT]optionalarguments:-h,--helpshowthishelpmessageandexit--outputOUTPUT,-oOUTPUTPathtooutputfolder.Default:blockomics_output.

Requiredarguments:--blocks_fileBLOCKS_FILE,-bBLOCKS_FILEBlocksfolderresultedasoutputoforiginalSibeliaormaf2syntenytool.Usuallyit's `sibeliaz_out/3000/`folder.--annotated_folder ANNOTATED_FOLDER, -a ANNOTATED_FOLDERLSTINFO folder path, output of `annotate` step ofPanACoTA.--pangenome_file PANGENOME_FILE, -pg PANGENOME_FILEFile .lst with orthologous genes, output of`pangenome` step of PanACoTA.--type {chr,contig}, -t {chr,contig}Type of genome assembly, either 'chr' or 'contig'Example command:badlon match -b sibeliaz_out/3000/blocks_coords.txt -a 2-annotate/ -pg 3-pangenome/*.lst -t contig