metaerg
metaerg copied to clipboard
utility scripts: "Inappropriate ioctl for device" and "unbinned" bin IDs
Hello! I'm trying to use the utility scripts for generating a report for a binned genome and adding bin IDs to the protein coding sequences and master.tsv file. I'm getting an error for the html report + unbinned IDs. Thanks in advance for any help!
First I ran:
fastaContig2Gff.pl -c /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/mybindir/DeMMO1_8.fa -g /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/all.gff > DeMMO1_8.gff
I checked this output and it looks fine, has header lines, i.e. ">metaerg.pl|62271" followed by protein sequences.
Next I tried to generate the html report for the bin but I get an error "Inappropriate ioctl for device". This is the script I ran with the console output:
$ output_reports.pl -d /projects/p30777/db -g DeMMO1_8.gff -f /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/mybindir/Bin.DeMMO1_8.fa -o mybindir2
"my" variable $dbdir masks earlier declaration in same scope at /home/cpc7770/metaerginstall/bin/output_reports.pl line 26.
[Thu Dec 5 14:52:24 2019] Re-using existing --outdir mybindir2
[Thu Dec 5 14:52:24 2019] start to read DeMMO1_8.gff file
--------------------- WARNING ---------------------
MSG: Got a sequence without letters. Could not guess alphabet
---------------------------------------------------
[Thu Dec 5 14:52:34 2019] end to read DeMMO1_8.gff file
[Thu Dec 5 14:52:34 2019] start to read /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/mybindir/Bin.DeMMO1_8.fa file
[Thu Dec 5 14:52:34 2019] end to read /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/mybindir/Bin.DeMMO1_8.fa file
type=tRNA
type=crispr
type=rRNA
type=sprot
type=tigrfam
type=pfam
type=casgene
type=metabolic
type=genomedb
type=ec
type=ko
type=go
[Thu Dec 5 14:52:34 2019] ******start running minpath MinPath.py -ko mybindir2/data/cds.gene2ko.mapping.txt -report mybindir2/data/cds.gene2ko.minpath -details mybindir2/data/cds.gene2ko.minpath.details > /dev/null 2>&1;
[Thu Dec 5 14:52:34 2019] Running: MinPath.py -ko mybindir2/data/cds.gene2ko.mapping.txt -report mybindir2/data/cds.gene2ko.minpath -details mybindir2/data/cds.gene2ko.minpath.details > /dev/null 2>&1;
[Thu Dec 5 14:52:34 2019] Could not run command:MinPath.py -ko mybindir2/data/cds.gene2ko.mapping.txt -report mybindir2/data/cds.gene2ko.minpath -details mybindir2/data/cds.gene2ko.minpath.details > /dev/null 2>&1;, Inappropriate ioctl for device
Then I tried to add bin IDs to the protein sequences using a directory of all my binned genomes. I thought the prefix might be the issue so I changed it to "Bin." This resulted in sequences with a bin ID "unbinned". I also tried to add bin IDs to the master.tsv file which also resulted in "unbinned" IDs.
#rename prefix of bin files
for file in *; do
mv $file Bin.${file%%}
done
#Add bin id to the fasta format of the protein coding sequence and protein coding sequence id will be in the format of "binid_geneid"
add_binid2cds.pl -d mybindir -p Bin -c /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/cds.faa -g /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/all.gff
#Add bin ids to master.tsv file, as the first column
add_binid2master_dot_tsv.pl -d mybindir -t /projects/p30777/Omics_methods_pub/metaerg/DeMMO1/data/master.tsv.txt > test.txt