Follow me
-
Recent Posts
calendar
December 2024 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Recent Comments
- Stan on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- Cormac on Pandas : how to compare dataframe with None
- LP on AWK: the substr command to select a substring
- jrab on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- How to disable SSL verification for urlretrieve? – Peter's blog on python: certificate verified failed
Archives
Categories
Meta
Author Archives: Thomas Cokelaer
missing SAM header with minimap2 and samtools
When using minimap2 to map sequencing reads onto a reference, you can use this kind of command (be careful, this is wrong as you will see later): minimap2 -a -x map-pb test.fastq reference.fasta > minimap.samminimap2 -a -x map-pb test.fastq reference.fasta … Continue reading
How to get pypi statistics about package download
A while ago, I designed pypiview, a Python package used to fetch the number of downloads for a package hosted on pypi website. It used to work decently but according to pypi itself the values stored are not reliable and … Continue reading
How to prevent wget from creating duplicates
wget is used to download file from internet. For instance: wget http://url/test.csvwget http://url/test.csv So far so good but two things may happen. First, you may interrupt the download. Second, you may load the file again. Sometimes, files are huge and … Continue reading
Meaning of Real, User and Sys time statistics
Under Linux, the time command is quite convenient to get the elapsed time taken by a command call. It is very simple to use: just type your command preceded by the time command itself. For instance: time dftime df The … Continue reading
Posted in Linux
2 Comments
git : How to remove a big file wrongly committed
I added a large file to a git repository (102Mb), commited and push and got an error due to size limit limitations on github remote: error: GH001: Large files detected. You may want to try Git Large File Storage – … Continue reading
git and github : skip password typing with https
if you clone a github repository using the https:// method (instead of ssh), you will have to type your username and passwor all the time. In order to avoid having to type you password all the time, you can use … Continue reading
failed to convert from cram to bam (parse error CIGAR character)
In order to convert a bioinformatic file from CRAM to BAM format, I naively used the samtools command available on a cluster but got this error: samtools view -T reference.fa -b -o output.bam input.cram [sam_header_read2] 3366 sequences loaded. [sam_read1] reference … Continue reading
How to mount and create a partition on a hard drive dock (fedora)
I got a new hard drive (2.7Tb) but wanted to use it with a docking station. Here are the steps required to use it under my Fedora box. First, I naively went into the Nautilus File Browser hoping to see … Continue reading
AWK: convert into lower or upper cases
In order to convert a bash variable to lower case with awk, just use this command: a="UPPER CASE" echo "$a" | awk ‘{print tolower($0)}’a="UPPER CASE" echo "$a" | awk ‘{print tolower($0)}’ If you want to convert the content of a … Continue reading
How to sort a dictionary by values in Python
By definition, dictionary are not sorted (to speed up access). Let us consider the following dictionary, which stores the age of several persons as values: d = {"Pierre": 42, "Anne": 33, "Zoe": 24}d = {"Pierre": 42, "Anne": 33, "Zoe": 24} … Continue reading