Skip to content

ncct-mibi/utils

Repository files navigation

utils

rename_file.py

  • Rename the Illumina files with a CSV file.
  • Usage: python rename_file.py -csv samples.csv -i illumina_reads_directory/

change_barcode_filename.sh

  • Rename the FASTQ file with the barcode and copy them outside the barcode folders.

run_metamaps.sh

  • Run MetaMaps.

split_file.sh

  • How to split file with bash command.

prokkaGFF2fcGTF.sh

Convert a gff file generated by PROKKA to a featureCounts-compatible gtf (and probably nf-core/rnaseq-compatible)

Run seqkit stats with GNU parallel (much faster with many files)

If fastq files are in fastq folder, just this:

ls -d fastq/*fastq.gz | parallel seqkit stats -T -a | sed -n '/file/!p'

or

parallel -k seqkit stats -T -a ::: fastq/js/*fastq.gz | sed -n '/file/!p'

The header (that is deleted and has to be added again) for the output is:

file format type num_seqs sum_len min_len avg_len max_len Q1 Q2 Q3 sum_gap N50 Q20(%) Q30(%)

rename_nanopore.sh

  • Rename the Nanopore files with a CSV file.
  • Usage: rename_nanopore.sh /path/to/nanopore/files/ /path/to/rename.csv